aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/html
diff options
context:
space:
mode:
authorCassioMarques <cassiommc@gmail.com>2009-01-11 20:35:14 -0200
committerCassioMarques <cassiommc@gmail.com>2009-01-11 20:35:47 -0200
commitde565b7e1d2376eb1506f96723bd2e13f3f40976 (patch)
tree4b4617dcdae5bc135e65ba6222ecdfb9c987f487 /railties/doc/guides/html
parent8b63abbb08d6ba72bd15ba3910babab5a53024c3 (diff)
downloadrails-de565b7e1d2376eb1506f96723bd2e13f3f40976.tar.gz
rails-de565b7e1d2376eb1506f96723bd2e13f3f40976.tar.bz2
rails-de565b7e1d2376eb1506f96723bd2e13f3f40976.zip
Adding explanation about how the callback chain is wrapped in a transaction
Diffstat (limited to 'railties/doc/guides/html')
-rw-r--r--railties/doc/guides/html/activerecord_validations_callbacks.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/doc/guides/html/activerecord_validations_callbacks.html b/railties/doc/guides/html/activerecord_validations_callbacks.html
index 5251869119..76a4ad0fa3 100644
--- a/railties/doc/guides/html/activerecord_validations_callbacks.html
+++ b/railties/doc/guides/html/activerecord_validations_callbacks.html
@@ -1262,7 +1262,7 @@ http://www.gnu.org/software/src-highlite -->
</div>
<h2 id="_halting_execution">12. Halting Execution</h2>
<div class="sectionbody">
-<div class="paragraph"><p>As you start registering new callbacks for your models, they will be queued for execution. This queue will include all your model&#8217;s validations, the registered callbacks and the database operation to be executed. However, if at any moment one of the <tt>before_create</tt>, <tt>before_save</tt>, <tt>before_update</tt> or <tt>before_destroy</tt> callback methods returns a boolean <tt>false</tt> (not <tt>nil</tt>) value, this execution chain will be halted and the desired operation will not complete: your model will not get persisted in the database, or your records will not get deleted and so on.</p></div>
+<div class="paragraph"><p>As you start registering new callbacks for your models, they will be queued for execution. This queue will include all your model&#8217;s validations, the registered callbacks and the database operation to be executed. However, if at any moment one of the <tt>before_create</tt>, <tt>before_save</tt>, <tt>before_update</tt> or <tt>before_destroy</tt> callback methods returns a boolean <tt>false</tt> (not <tt>nil</tt>) value or raise and exception, this execution chain will be halted and the desired operation will not complete: your model will not get persisted in the database, or your records will not get deleted and so on. It&#8217;s because the whole callback chain is wrapped in a transaction, so raising an exception or returning <tt>false</tt> fires a database ROLLBACK.</p></div>
</div>
<h2 id="_callback_classes">13. Callback classes</h2>
<div class="sectionbody">