This commit is contained in:
Toks
2015-07-04 22:00:31 -04:00
parent b1b31d7387
commit 4f4fd8cb35
5 changed files with 52 additions and 35 deletions

View File

@@ -171,6 +171,10 @@ class Comment < ActiveRecord::Base
def hidden_attributes
super + [:body_index]
end
def delete!
update_attribute(:is_deleted, true)
end
end
Comment.connection.extend(PostgresExtensions)