Methods

Included Modules

Class/Module Index [+]

Quicksearch

Mongoid::Callbacks

This module contains all the callback hooks for Mongoid.

Constants

CALLBACKS

Public Instance Methods

run_callbacks(kind, *args, &block) click to toggle source

Run the callbacks for the document. This overrides active support’s functionality to cascade callbacks to embedded documents that have been flagged as such.

@example Run the callbacks.

run_callbacks :save do
  save!
end

@param [ Symbol ] kind The type of callback to execute. @param [ Array ] *args Any options.

@return [ Document ] The document

@since 2.3.0

# File lib/mongoid/callbacks.rb, line 39
def run_callbacks(kind, *args, &block)
  run_cascading_callbacks(cascadable_children(kind), kind, *args) do
    super(kind, *args, &block)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.