Module: MarkAsDeleted::ActiveRecord
- Defined in:
- lib/mark_as_deleted/active_record.rb
Instance Method Summary collapse
Instance Method Details
#mark_as_deleted(deleted_column = :deleted) ⇒ Object
3 4 5 6 7 |
# File 'lib/mark_as_deleted/active_record.rb', line 3 def mark_as_deleted(deleted_column = :deleted) define_method(:destroy) do self.update_attributes(deleted_column => true) end end |