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.
59 60 61 62 63 64 65 66 |
# File 'lib/sequel/plugins/instance_hooks.rb', line 59 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.
53 54 55 56 |
# File 'lib/sequel/plugins/instance_hooks.rb', line 53 def after_validation super run_after_instance_hooks(:after_validation) end |