aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/active_record_validations_callbacks.textile
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 16:36:28 -0200
commit2d73f70ac570a398b1b0a4e201af2ce4aeb83a6d (patch)
treeda9ff64edd9f33771885f616cad7bb3830ea1646 /railties/guides/source/active_record_validations_callbacks.textile
parent79a0488ceaa8bcf7135909872274ed09a88b4bae (diff)
downloadrails-2d73f70ac570a398b1b0a4e201af2ce4aeb83a6d.tar.gz
rails-2d73f70ac570a398b1b0a4e201af2ce4aeb83a6d.tar.bz2
rails-2d73f70ac570a398b1b0a4e201af2ce4aeb83a6d.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/source/active_record_validations_callbacks.textile')
-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+