123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::DefineCallbacks

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Base, ActiveRecord::InternalMetadata, ActiveRecord::SchemaMigration
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: activerecord/lib/active_record/define_callbacks.rb

Overview

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

Class Method Summary

DSL Calls

included

[ GitHub ]


15
16
17
18
19
20
# File 'activerecord/lib/active_record/define_callbacks.rb', line 15

included do
  include ActiveModel::Validations::Callbacks

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