|
|
@ -155,7 +155,7 @@ class MemosController < ApplicationController
|
|
|
|
@reply.root_id = memo.root_id || memo.id
|
|
|
|
@reply.root_id = memo.root_id || memo.id
|
|
|
|
memo.children << @reply
|
|
|
|
memo.children << @reply
|
|
|
|
m = Memo.find_by!(id: @reply.root_id)
|
|
|
|
m = Memo.find_by!(id: @reply.root_id)
|
|
|
|
m.increment!(:all_replies_count)
|
|
|
|
m.increment!(:all_replies_count, 1, true)
|
|
|
|
rescue Exception => e
|
|
|
|
rescue Exception => e
|
|
|
|
tip_exception("回复失败,原因:#{e}")
|
|
|
|
tip_exception("回复失败,原因:#{e}")
|
|
|
|
raise ActiveRecord::Rollback
|
|
|
|
raise ActiveRecord::Rollback
|
|
|
|