diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index fba1607a5..119cf80ff 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -1,10 +1,11 @@ class DiscussesController < ApplicationController - include ApplicationHelper LIMIT = 10 before_action :require_login, only: [:create, :reply, :hidden, :reward_code, :plus, :destroy] before_action :find_container, only: [:index, :hidden] before_action :find_discuss, except: [:create, :index, :new_message, :reward_code, :forum_discusses, :plus] + include ApplicationHelper + def index page = params[:page].to_i offset = page * LIMIT diff --git a/app/views/memos/reply.json.jbuilder b/app/views/memos/reply.json.jbuilder index c117d2d24..ce061022a 100644 --- a/app/views/memos/reply.json.jbuilder +++ b/app/views/memos/reply.json.jbuilder @@ -1,2 +1,3 @@ -json.(@reply, :id, :subject, :content, :hidden, :forum_id, :author_id, :all_replies_count, :is_md, :parent_id, :root_id, - :reward, :sticky, :updated_at, :created_at, :viewed_count) \ No newline at end of file +json.(@reply, :id, :subject, :hidden, :forum_id, :author_id, :all_replies_count, :is_md, :parent_id, :root_id, + :reward, :sticky, :updated_at, :created_at, :viewed_count) +json.content content_safe(@reply.content) \ No newline at end of file