aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-25 09:57:46 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-25 10:03:38 -0200
commitb844bf6a65c4e8eb330f45ef7b8343bec657bab9 (patch)
tree29db1693a6cfc96b2cc0f1d7f10297fce1c31c97 /railties/guides
parent0186c5dcea332ef033a8142047cdea1d7fde5d07 (diff)
downloadrails-b844bf6a65c4e8eb330f45ef7b8343bec657bab9.tar.gz
rails-b844bf6a65c4e8eb330f45ef7b8343bec657bab9.tar.bz2
rails-b844bf6a65c4e8eb330f45ef7b8343bec657bab9.zip
Fix callbacks order for destroying an object in validations guide
Also add around save to creating/updating callbacks order, and fix save example with no validation
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/active_record_validations_callbacks.textile6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile
index 4b74fae94e..15d24f9ac1 100644
--- a/railties/guides/source/active_record_validations_callbacks.textile
+++ b/railties/guides/source/active_record_validations_callbacks.textile
@@ -956,6 +956,7 @@ h4. Creating an Object
* +before_validation+
* +after_validation+
* +before_save+
+* +around_save+
* +before_create+
* +around_create+
* +after_create+
@@ -966,6 +967,7 @@ h4. Updating an Object
* +before_validation+
* +after_validation+
* +before_save+
+* +around_save+
* +before_update+
* +around_update+
* +after_update+
@@ -974,8 +976,8 @@ h4. Updating an Object
h4. Destroying an Object
* +before_destroy+
-* +after_destroy+
* +around_destroy+
+* +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.
@@ -1020,7 +1022,7 @@ The following methods trigger callbacks:
* +increment!+
* +save+
* +save!+
-* +save(false)+
+* +save(:validate => false)+
* +toggle!+
* +update+
* +update_attribute+