public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/josh/rails.git
Update callbacks documentation. #3970 [Robby Russell 
<robby@planetargon.com>]  Merge doc patches with stable.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4702 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Marcel Molina (author)
Sun Aug 06 23:21:32 -0700 2006
commit  171aa5c4c1ede63335902b073a22d56ae9cbbf97
tree    5e6eec7899993c1422dca5173ad1a37f0082cd6e
parent  fc1ded46e7e9665cc130681e3a9214295043225d
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *1.14.3* (June 27th, 2006)
0
 
0
+* Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>]
0
+
0
 * Properly quote index names in migrations (closes #4764) [John Long]
0
 
0
 * Ensure that Associations#include_eager_conditions? checks both scoped and explicit conditions [Rick]
...
243
244
245
 
 
 
 
246
247
248
...
312
313
314
 
 
 
315
316
317
 
 
 
 
318
319
320
...
243
244
245
246
247
248
249
250
251
252
...
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
0
@@ -243,6 +243,10 @@ module ActiveRecord
0
     def before_save() end
0
 
0
     # Is called _after_ Base.save (regardless of whether it's a create or update save).
0
+ #
0
+ # class Contact < ActiveRecord::Base
0
+ # after_save { logger.info( 'New contact saved!' ) }
0
+ # end
0
     def after_save() end
0
     def create_or_update_with_callbacks #:nodoc:
0
       return false if callback(:before_save) == false
0
@@ -312,9 +316,16 @@ module ActiveRecord
0
     end
0
 
0
     # Is called _before_ Base.destroy.
0
+ #
0
+ # Note: If you need to _destroy_ or _nullify_ associated records first,
0
+ # use the _:dependent_ option on your associations.
0
     def before_destroy() end
0
 
0
     # Is called _after_ Base.destroy (and all the attributes have been frozen).
0
+ #
0
+ # class Contact < ActiveRecord::Base
0
+ # after_destroy { |record| logger.info( "Contact #{record.id} was destroyed." ) }
0
+ # end
0
     def after_destroy() end
0
     def destroy_with_callbacks #:nodoc:
0
       return false if callback(:before_destroy) == false

Comments

    No one has commented yet.