Module: OnDestroy::Model::ClassMethods
- Defined in:
- lib/on_destroy/model.rb
Instance Method Summary collapse
-
#on_destroy(*args) ⇒ Object
a shortcut to set configuration: self.do_not_delete, self.set, self.to, self.is_deleted_if and to default self.is_deleted_if to a proc that.
Instance Method Details
#on_destroy(*args) ⇒ Object
a shortcut to set configuration: self.do_not_delete, self.set, self.to, self.is_deleted_if and to default self.is_deleted_if to a proc that
17 18 19 20 21 |
# File 'lib/on_destroy/model.rb', line 17 def on_destroy(*args) = args. self.do_not_delete = args.include?(:do_not_delete) self. = end |