Module: Sequel::Plugins::InstanceHooks::InstanceMethods
- Defined in:
- lib/sequel/plugins/instance_hooks.rb
Constant Summary collapse
- BEFORE_HOOKS =
Sequel::Model::BEFORE_HOOKS
- AFTER_HOOKS =
Sequel::Model::AFTER_HOOKS
- HOOKS =
BEFORE_HOOKS + AFTER_HOOKS
Instance Method Summary collapse
-
#after_save ⇒ Object
Run after save hooks, clearing both the save and validation hooks.
-
#after_validation ⇒ Object
Run after validation hooks, without clearing the validation hooks.
Instance Method Details
#after_save ⇒ Object
Run after save hooks, clearing both the save and validation hooks.
61 62 63 64 65 66 67 68 |
# File 'lib/sequel/plugins/instance_hooks.rb', line 61 def after_save super run_after_instance_hooks(:after_save) @instance_hooks.delete(:after_save) @instance_hooks.delete(:before_save) @instance_hooks.delete(:after_validation) @instance_hooks.delete(:before_validation) end |
#after_validation ⇒ Object
Run after validation hooks, without clearing the validation hooks.
55 56 57 58 |
# File 'lib/sequel/plugins/instance_hooks.rb', line 55 def after_validation super run_after_instance_hooks(:after_validation) end |