Module: Mongoid::Callbacks
- Defined in:
- lib/mongoid/callbacks.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/mongoid/callbacks.rb', line 4 def self.included(base) base.class_eval do include ActiveSupport::Callbacks # Define all the callbacks that are accepted by the document. define_callbacks \ :before_create, :after_create, :before_destroy, :after_destroy, :before_save, :after_save, :before_update, :after_update, :before_validation, :after_validation end end |