Sha256: 590ebdc9733ade46b0e88a4543cd640f807cc2704fb2a36e59585c10939c84ed

Contents?: true

Size: 711 Bytes

Versions: 16

Compression:

Stored size: 711 Bytes

Contents

# encoding: utf-8

module CouchRest #:nodoc:
  module Model #:nodoc:

    module Callbacks
      extend ActiveSupport::Concern

      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,
      ]

      included do
        extend ActiveModel::Callbacks
        include ActiveModel::Validations::Callbacks

        define_model_callbacks :initialize, :only => :after
        define_model_callbacks :create, :destroy, :save, :update
      end
    end

  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
couchrest_model-2.2.0.beta2 lib/couchrest/model/callbacks.rb
couchrest_model-2.2.0.beta1 lib/couchrest/model/callbacks.rb
couchrest_model-2.1.0.rc1 lib/couchrest/model/callbacks.rb
couchrest_model-2.1.0.beta2 lib/couchrest/model/callbacks.rb
couchrest_model-2.1.0.beta1 lib/couchrest/model/callbacks.rb
couchrest_model-2.0.4 lib/couchrest/model/callbacks.rb
couchrest_model-2.0.3 lib/couchrest/model/callbacks.rb
couchrest_model-2.0.1 lib/couchrest/model/callbacks.rb
couchrest_model-2.0.0 lib/couchrest/model/callbacks.rb
couchrest_model-2.0.0.beta2 lib/couchrest/model/callbacks.rb
couchrest_model-2.0.0.beta lib/couchrest/model/callbacks.rb
couchrest_model-1.2.0.beta lib/couchrest/model/callbacks.rb
openlogic-couchrest_model-1.0.0 lib/couchrest/model/callbacks.rb
couchrest_model-1.1.2 lib/couchrest/model/callbacks.rb
couchrest_model-1.1.1 lib/couchrest/model/callbacks.rb
couchrest_model-1.1.0 lib/couchrest/model/callbacks.rb