added post pruner, added mod action notifications when approving/deleting posts

This commit is contained in:
albert
2011-09-30 11:34:41 -04:00
parent f5e1139eec
commit 3c1a25f6d8
6 changed files with 104 additions and 2 deletions

View File

@@ -299,6 +299,7 @@ class Post < ActiveRecord::Base
self.is_deleted = false
self.approver_id = CurrentUser.id
save!
ModAction.create(:description => "approved post ##{id}")
end
end
@@ -900,6 +901,7 @@ class Post < ActiveRecord::Base
update_column(:is_deleted, true)
update_parent_on_destroy
tag_array.each {|x| expire_cache(x)}
ModAction.create(:description => "deleted post ##{id}")
end
end
@@ -907,6 +909,7 @@ class Post < ActiveRecord::Base
update_column(:is_deleted, false)
tag_array.each {|x| expire_cache(x)}
update_parent_on_save
ModAction.create(:description => "undeleted post ##{id}")
end
end