Remove the distinction between "x replies below" and "x replies"

This commit is contained in:
Robin Ward
2013-02-08 17:10:18 -05:00
parent 12d3c3b66b
commit 25e9cfe3b8
10 changed files with 2051 additions and 55 deletions

View File

@@ -473,8 +473,7 @@ class Post < ActiveRecord::Base
if post.present?
post_reply = post.post_replies.new(reply_id: self.id)
if post_reply.save
Post.update_all ['reply_count = reply_count + 1, reply_below_post_number = COALESCE(reply_below_post_number, ?)', self.post_number],
["id = ?", post.id]
Post.update_all ['reply_count = reply_count + 1'], id: post.id
end
end
end