Mercurial > hg > soundsoftware-site
diff app/models/message.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
line wrap: on
line diff
--- a/app/models/message.rb Tue Sep 09 09:28:31 2014 +0100 +++ b/app/models/message.rb Tue Sep 09 09:29:00 2014 +0100 @@ -68,7 +68,7 @@ def update_messages_board if board_id_changed? - Message.update_all({:board_id => board_id}, ["id = ? OR parent_id = ?", root.id, root.id]) + Message.where(["id = ? OR parent_id = ?", root.id, root.id]).update_all({:board_id => board_id}) Board.reset_counters!(board_id_was) Board.reset_counters!(board_id) end @@ -76,7 +76,7 @@ def reset_counters! if parent && parent.id - Message.update_all({:last_reply_id => parent.children.maximum(:id)}, {:id => parent.id}) + Message.where({:id => parent.id}).update_all({:last_reply_id => parent.children.maximum(:id)}) end board.reset_counters! end