Module: Armada::Callbacks
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/armada/callbacks.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- CALLBACKS =
[ :before_validation, :after_validation, :before_save, :after_save, :around_save, :before_create, :after_create, :around_create, :before_update, :after_update, :around_update, :before_destroy, :after_destroy, :around_destroy ]
Instance Method Summary collapse
Instance Method Details
#destroy_with_callbacks ⇒ Object
51 52 53 54 55 |
# File 'lib/armada/callbacks.rb', line 51 def destroy_with_callbacks _run_destroy_callbacks do destroy_without_callbacks end end |
#valid_with_callbacks? ⇒ Boolean
44 45 46 47 48 49 |
# File 'lib/armada/callbacks.rb', line 44 def valid_with_callbacks? @_on_validate = new_record? ? :create : :update _run_validation_callbacks do valid_without_callbacks? end end |