Created
December 8, 2010 16:08
-
-
Save evtuhovich/733479 to your computer and use it in GitHub Desktop.
nested transaction rollback documentation diff for rails 2.3.10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb | |
index 0b6e52c..92a374d 100644 | |
--- a/activerecord/lib/active_record/transactions.rb | |
+++ b/activerecord/lib/active_record/transactions.rb | |
@@ -135,7 +135,8 @@ module ActiveRecord | |
# end | |
# end | |
# | |
- # User.find(:all) # => empty | |
+ # User.find(:all) # => Returns Kotori and Nemu, because AcriveRecord::Rollback | |
+ # do not re-raise | |
# | |
# It is also possible to requires a sub-transaction by passing | |
# <tt>:requires_new => true</tt>. If anything goes wrong, the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment