Staff can enter and view deleted topics

This commit is contained in:
Robin Ward
2013-07-11 16:39:35 -04:00
parent eba662b988
commit 19c169540c
24 changed files with 176 additions and 83 deletions
+4 -1
View File
@@ -5,7 +5,6 @@ module Trashable
default_scope where(with_deleted_scope_sql)
# scope unscoped does not work
belongs_to :deleted_by, class_name: 'User'
end
@@ -26,6 +25,10 @@ module Trashable
end
end
def trashed?
deleted_at.present?
end
def trash!(trashed_by=nil)
# note, an argument could be made that the column should probably called trashed_at
# however, deleted_at is the terminology used in the UI