dev_local_scyd
daiao 5 years ago
parent 8c058f3f47
commit d47eee19c2

@ -59,6 +59,7 @@ class MessagesController < ApplicationController
def reply
return normal_status(2, "回复内容不能为空") if params[:content].blank?
@content = params[:content]
@reply = Message.create!(board: @message.board, root_id: @message.root_id || @message.id,
author: current_user, parent: @message,
message_detail_attributes: {

@ -1,7 +1,7 @@
json.partial! "commons/success"
json.data do
json.id @reply.id
json.content content_safe(params[:content])
json.content content_safe(@reply.notes)
json.author do
json.partial! "users/user_simple", user: @reply.author
end

@ -1,4 +1,4 @@
json.status 0
json.message "success"
json.id @message.id
json.content content_safe(params[:content])
json.content content_safe()
Loading…
Cancel
Save