|
|
|
@ -62,8 +62,8 @@ class MessagesController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def reply
|
|
|
|
|
return normal_status(2, "回复内容不能为空") if params[:content].blank?
|
|
|
|
|
return normal_status(2, "回复内容不能超过2000字符") if params[:content].length > 2000
|
|
|
|
|
return normal_status(-1, "回复内容不能为空") if params[:content].blank?
|
|
|
|
|
return normal_status(-1, "回复内容不能超过2000字符") if params[:content].length > 2000
|
|
|
|
|
@reply = Message.create!(board: @message.board, root_id: @message.root_id || @message.id,
|
|
|
|
|
author: current_user, parent: @message,
|
|
|
|
|
message_detail_attributes: {
|
|
|
|
|