Skip to content

Instantly share code, notes, and snippets.

@evtuhovich
Created December 8, 2010 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evtuhovich/733479 to your computer and use it in GitHub Desktop.
Save evtuhovich/733479 to your computer and use it in GitHub Desktop.
nested transaction rollback documentation diff for rails 2.3.10
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