W3cubDocs

/Ruby on Rails 7.0

module ActiveRecord::Callbacks::ClassMethods

Included modules:
ActiveModel::Callbacks

Public Instance Methods

after_create(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 372
      

Registers a callback to be called after a record is created. See ActiveRecord::Callbacks for more information.

after_destroy(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 420
    

Registers a callback to be called after a record is destroyed. See ActiveRecord::Callbacks for more information.

after_find(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 316
      

Registers a callback to be called after a record is instantiated via a finder. See ActiveRecord::Callbacks for more information.

after_initialize(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 308
      

Registers a callback to be called after a record is instantiated. See ActiveRecord::Callbacks for more information.

after_save(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 348
      

Registers a callback to be called after a record is saved. See ActiveRecord::Callbacks for more information.

after_touch(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 324
      

Registers a callback to be called after a record is touched. See ActiveRecord::Callbacks for more information.

after_update(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 396
      

Registers a callback to be called after a record is updated. See ActiveRecord::Callbacks for more information.

around_create(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 364
      

Registers a callback to be called around the creation of a record. See ActiveRecord::Callbacks for more information.

around_destroy(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 412
      

Registers a callback to be called around the destruction of a record. See ActiveRecord::Callbacks for more information.

around_save(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 340
      

Registers a callback to be called around the save of a record. See ActiveRecord::Callbacks for more information.

around_update(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 388
      

Registers a callback to be called around the update of a record. See ActiveRecord::Callbacks for more information.

before_create(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 356
      

Registers a callback to be called before a record is created. See ActiveRecord::Callbacks for more information.

before_destroy(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 404
      

Registers a callback to be called before a record is destroyed. See ActiveRecord::Callbacks for more information.

before_save(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 332
      

Registers a callback to be called before a record is saved. See ActiveRecord::Callbacks for more information.

before_update(*args, &block) Show source
# File activerecord/lib/active_record/callbacks.rb, line 380
      

Registers a callback to be called before a record is updated. See ActiveRecord::Callbacks for more information.

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.