Module: Mongoid::Callbacks
Overview
This module contains all the callback hooks for Mongoid.
Constant Summary collapse
- CALLBACKS =
[ :before_validation, :after_validation, :after_initialize, :before_create, :around_create, :after_create, :before_destroy, :around_destroy, :after_destroy, :before_save, :around_save, :after_save, :before_update, :around_update, :after_update, ]
Instance Method Summary collapse
-
#run_callbacks(kind, *args, &block) ⇒ Document
Run the callbacks for the document.
Instance Method Details
#run_callbacks(kind, *args, &block) ⇒ Document
Run the callbacks for the document. This overrides active support’s functionality to cascade callbacks to embedded documents that have been flagged as such.
40 41 42 43 44 |
# File 'lib/mongoid/callbacks.rb', line 40 def run_callbacks(kind, *args, &block) run_cascading_callbacks(cascadable_children(kind), kind, *args) do super(kind, *args, &block) end end |