Sha256: f3c4d0f579f69013d5b55e62e8eddf0c98df05e5664f90744d7f951c3b019e6d

Contents?: true

Size: 684 Bytes

Versions: 73

Compression:

Stored size: 684 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  # This module exists because ActiveRecord::AttributeMethods::Dirty needs to
  # define callbacks, but continue to have its version of +save+ be the super
  # method of ActiveRecord::Callbacks. This will be removed when the removal
  # of deprecated code removes this need.
  module DefineCallbacks
    extend ActiveSupport::Concern

    module ClassMethods # :nodoc:
      include ActiveModel::Callbacks
    end

    included do
      include ActiveModel::Validations::Callbacks

      define_model_callbacks :initialize, :find, :touch, only: :after
      define_model_callbacks :save, :create, :update, :destroy
    end
  end
end

Version data entries

73 entries across 73 versions & 7 rubygems

Version Path
activerecord-5.2.4.1 lib/active_record/define_callbacks.rb
activerecord-6.0.2 lib/active_record/define_callbacks.rb
activerecord-6.0.2.rc2 lib/active_record/define_callbacks.rb
activerecord-5.2.4 lib/active_record/define_callbacks.rb
activerecord-6.0.2.rc1 lib/active_record/define_callbacks.rb
activerecord-5.2.4.rc1 lib/active_record/define_callbacks.rb
activerecord-6.0.1 lib/active_record/define_callbacks.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/activerecord-6.0.0/lib/active_record/define_callbacks.rb
activerecord-6.0.1.rc1 lib/active_record/define_callbacks.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/activerecord-6.0.0/lib/active_record/define_callbacks.rb
activerecord-6.0.0 lib/active_record/define_callbacks.rb
spiral_form-0.1.1 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/define_callbacks.rb
spiral_form-0.1.0 vendor/bundle/gems/activerecord-5.2.3/lib/active_record/define_callbacks.rb
activerecord-6.0.0.rc2 lib/active_record/define_callbacks.rb
activerecord-6.0.0.rc1 lib/active_record/define_callbacks.rb
activerecord-5.2.3 lib/active_record/define_callbacks.rb
activerecord-5.2.3.rc1 lib/active_record/define_callbacks.rb
activerecord-6.0.0.beta3 lib/active_record/define_callbacks.rb
activerecord-5.2.2.1 lib/active_record/define_callbacks.rb
activerecord-6.0.0.beta2 lib/active_record/define_callbacks.rb