instance method
after_save
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
after_save()
Is called after Base.save (regardless of whether it’s a create or update save). Note that this callback is still wrapped in the transaction around save. For example, if you invoke an external indexer at this point it won’t see the changes in the database.
class Contact < ActiveRecord::Base after_save { logger.info( 'New contact saved!' ) } end
Source
# File activerecord/lib/active_record/callbacks.rb, line 247
def after_save() end
Defined in activerecord/lib/active_record/callbacks.rb line 247
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Callbacks