fix reply message api

dev_course
p31729568 6 years ago
parent d094259051
commit 7135094316

@ -51,7 +51,8 @@ class MessagesController < ApplicationController
def reply
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: {
content: params[:content]
})

Loading…
Cancel
Save