diff --git a/app/models/forum_topic.rb b/app/models/forum_topic.rb index 2a801ea50..2e3a2283d 100644 --- a/app/models/forum_topic.rb +++ b/app/models/forum_topic.rb @@ -149,8 +149,8 @@ class ForumTopic < ActiveRecord::Base def merge(topic) ForumPost.where(:id => self.posts.map(&:id)).update_all(:topic_id => topic.id) - topic.update_attribute(:response_count, topic.response_count + self.posts.length) - self.update_columns(:response_count => 0, :is_deleted => true) + topic.update_attributes(:response_count => topic.response_count + self.posts.length, :updater_id => CurrentUser.id) + self.update_columns(:response_count => 0, :is_deleted => true, :updater_id => CurrentUser.id) end def delete! diff --git a/test/unit/forum_post_test.rb b/test/unit/forum_post_test.rb index 36da3b624..4836d8fde 100644 --- a/test/unit/forum_post_test.rb +++ b/test/unit/forum_post_test.rb @@ -26,7 +26,7 @@ class ForumPostTest < ActiveSupport::TestCase end dmail = Dmail.last - assert_equal("You were mentioned in the forum topic \"#{@topic.title}\":#{Danbooru.config.hostname}/forum_topics/#{@topic.id}?page=1\n\n
\n\nHey @#{@user2.name} check this out!", dmail.body) + assert_equal("You were mentioned in the forum topic \"#{@topic.title}\":#{Danbooru.config.hostname}/forum_topics/#{@topic.id}?page=1\n\n---\n\nHey @#{@user2.name} check this out!", dmail.body) end end