Module: Undestroy::Binding::ActiveRecord::Restorable
- Defined in:
- lib/undestroy/binding/active_record/restorable.rb
Defined Under Namespace
Modules: RelationExtensions
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(receiver) ⇒ Object
Instance Method Details
#restore ⇒ Object
3
4
5
6
|
# File 'lib/undestroy/binding/active_record/restorable.rb', line 3
def restore
restore_copy
destroy
end
|
#restore_copy ⇒ Object
8
9
10
11
|
# File 'lib/undestroy/binding/active_record/restorable.rb', line 8
def restore_copy
config = undestroy_model_binding.config
config.internals[:restore].new(:target => self, :config => config).run
end
|