回复问题

dev_local_scyd
daiao 5 years ago
parent b52f0e9841
commit 610dd03023

@ -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

@ -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)
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)
Loading…
Cancel
Save