Fix forum deletions

This commit is contained in:
Toks
2015-07-15 00:40:58 -04:00
parent 6ad6aa44c4
commit 0691477a3b
2 changed files with 4 additions and 4 deletions

View File

@@ -128,12 +128,12 @@ class ForumPost < ActiveRecord::Base
end end
def delete! def delete!
update_attribute(:is_deleted, true) update_attributes({:is_deleted => true}, :as => CurrentUser.role)
update_topic_updated_at_on_delete update_topic_updated_at_on_delete
end end
def undelete! def undelete!
update_attribute(:is_deleted, false) update_attributes({:is_deleted => false}, :as => CurrentUser.role)
update_topic_updated_at_on_undelete update_topic_updated_at_on_undelete
end end

View File

@@ -153,10 +153,10 @@ class ForumTopic < ActiveRecord::Base
end end
def delete! def delete!
update_attributes(:is_deleted => true) update_attributes({:is_deleted => true}, :as => CurrentUser.role)
end end
def undelete! def undelete!
update_attributes(:is_deleted => false) update_attributes({:is_deleted => false}, :as => CurrentUser.role)
end end
end end