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