Sha256: 278364f470f20b11cfc8a829795aabc71c7098b2c332a1d7fe94c0889d34c2e1

Contents?: true

Size: 541 Bytes

Versions: 35

Compression:

Stored size: 541 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Callbacks
    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
  end
end

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
mongoid-1.9.5 lib/mongoid/callbacks.rb
mongoid-with-auth-1.9.4 lib/mongoid/callbacks.rb
mongoid-rails2-1.9.4 lib/mongoid/callbacks.rb
mongoid-rails2-1.9.3 lib/mongoid/callbacks.rb
mongoid-1.9.2 lib/mongoid/callbacks.rb
sskirby-mongoid-1.9.1 lib/mongoid/callbacks.rb
mongoid-1.9.1 lib/mongoid/callbacks.rb
mongoid-1.9.0 lib/mongoid/callbacks.rb
mongoid-1.2.14 lib/mongoid/callbacks.rb
mongoid-1.2.13 lib/mongoid/callbacks.rb
mongoid-1.2.12 lib/mongoid/callbacks.rb
mongoid-1.2.11 lib/mongoid/callbacks.rb
mongoid-1.2.10 lib/mongoid/callbacks.rb
mongoid-1.2.9 lib/mongoid/callbacks.rb
mongoid-1.2.8 lib/mongoid/callbacks.rb
mongoid-1.2.7 lib/mongoid/callbacks.rb
mongoid-1.2.6 lib/mongoid/callbacks.rb
mongoid-1.2.5 lib/mongoid/callbacks.rb
mongoid-1.2.4 lib/mongoid/callbacks.rb
mongoid-1.2.3 lib/mongoid/callbacks.rb