mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Staff can enter and view deleted topics
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user