From 08a1ff2613fcb2f0717bcad28331652596698aad Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 21 Feb 2013 14:07:43 -0500 Subject: [PATCH] fix bug with topic response count not getting updated --- app/models/forum_post.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/forum_post.rb b/app/models/forum_post.rb index 2e7c98cf0..a1db79ecc 100644 --- a/app/models/forum_post.rb +++ b/app/models/forum_post.rb @@ -87,8 +87,9 @@ class ForumPost < ActiveRecord::Base def update_topic_updated_at if topic - topic.update_column(:updater_id, CurrentUser.id) - topic.touch + topic.updater_id = CurrentUser.id + topic.response_count = topic.response_count + 1 + topic.save end end