This commit is contained in:
Sam 2013-05-07 14:50:02 +10:00
parent 066c2bed42
commit 381c42724f
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,12 @@ module Trashable
end
def trash!
# note, an argument could be made that the column should probably called trashed_at
# however, deleted_at is the terminology used in the UI
#
# we could hijack use a delete! and delete - redirecting the originals elsewhere, but that is
# confusing as well. So for now, we go with trash!
#
update_column(:deleted_at, DateTime.now)
end