From 4bf468cb8b1fadc8b7e0a60944873b5ae57f7691 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 11 Mar 2009 13:24:09 +0100 Subject: in validations guide, emphasize after_save runs always after more specific after_*s --- railties/guides/source/activerecord_validations_callbacks.textile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'railties') diff --git a/railties/guides/source/activerecord_validations_callbacks.textile b/railties/guides/source/activerecord_validations_callbacks.textile index 7ce1b80a6a..efa45a7ac6 100644 --- a/railties/guides/source/activerecord_validations_callbacks.textile +++ b/railties/guides/source/activerecord_validations_callbacks.textile @@ -823,6 +823,8 @@ h4. Destroying an Object * DELETE OPERATION * +after_destroy+ +WARNING. +after_save+ runs both on create and update, but always _after_ the more specific callbacks +after_create+ and +after_update+, no matter the order in which the macro calls were executed. + h4. +after_initialize+ and +after_find+ The +after_initialize+ callback will be called whenever an Active Record object is instantiated, either by directly using +new+ or when a record is loaded from the database. It can be useful to avoid the need to directly override your Active Record +initialize+ method. -- cgit v1.2.3