Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4702

Show
Ignore:
Timestamp:
08/07/06 06:21:32 (2 years ago)
Author:
marcel
Message:

Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>] Merge doc patches with stable.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable/activerecord/CHANGELOG

    r4496 r4702  
    11*1.14.3* (June 27th, 2006) 
     2 
     3* Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>] 
    24 
    35* Properly quote index names in migrations (closes #4764) [John Long] 
  • branches/stable/activerecord/lib/active_record/callbacks.rb

    r3682 r4702  
    244244 
    245245    # Is called _after_ Base.save (regardless of whether it's a create or update save). 
     246    # 
     247    #  class Contact < ActiveRecord::Base 
     248    #    after_save { logger.info( 'New contact saved!' ) } 
     249    #  end 
    246250    def after_save()  end 
    247251    def create_or_update_with_callbacks #:nodoc: 
     
    313317 
    314318    # Is called _before_ Base.destroy. 
     319    # 
     320    # Note: If you need to _destroy_ or _nullify_ associated records first, 
     321    # use the _:dependent_ option on your associations. 
    315322    def before_destroy() end 
    316323 
    317324    # Is called _after_ Base.destroy (and all the attributes have been frozen). 
     325    # 
     326    #  class Contact < ActiveRecord::Base 
     327    #    after_destroy { |record| logger.info( "Contact #{record.id} was destroyed." ) } 
     328    #  end 
    318329    def after_destroy()  end 
    319330    def destroy_with_callbacks #:nodoc: