Module: Undestroyable::Orm::ActiveRecord::Table::InstanceMethods
- Defined in:
- lib/undestroyable/orm/active_record/table.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'lib/undestroyable/orm/active_record/table.rb', line 56 def destroy run_callbacks :destroy do deleted_attributes = undest_compile_insert_attributes deleted_attributes << [self.class.undest_arel_table['deleted_at'], Time.now.utc] self.class.undest_relation.insert deleted_attributes destroy! end end |