flagging work, we should be clearing from the mod menu if a topic or post is deleted

This commit is contained in:
Sam Saffron
2013-02-06 12:13:41 +11:00
parent 3fd019c6bd
commit 6f2f7b0589
5 changed files with 35 additions and 4 deletions

View File

@ -11,7 +11,9 @@ class Topic < ActiveRecord::Base
versioned :if => :new_version_required?
acts_as_paranoid
after_recover :update_flagged_posts_count
after_destroy :update_flagged_posts_count
rate_limit :default_rate_limiter
rate_limit :limit_topics_per_day
rate_limit :limit_private_messages_per_day
@ -387,6 +389,10 @@ class Topic < ActiveRecord::Base
topic
end
def update_flagged_posts_count
PostAction.update_flagged_posts_count
end
# Create the summary of the interesting posters in a topic. Cheats to avoid
# many queries.