From 53bbbcc6638a9df86e74e4e420840f076e7c2994 Mon Sep 17 00:00:00 2001 From: Ivan Evtukhovich Date: Thu, 9 Dec 2010 00:41:47 +0300 Subject: [PATCH] Fix doc about nested transaction rollback Because AR::Rollback do not reraise and inner transaction is not "real" nothing rollback at all --- activerecord/lib/active_record/transactions.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 654c475aed..181280baaa 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -141,7 +141,8 @@ class TransactionError < ActiveRecordError # :nodoc: # end # end # - # User.find(:all) # => empty + # User.find(:all) # => Return both Kotori and Nemu, because inner transaction do not rollback + # # without :requiers_new => true option, and Rollback exception do not reraise # # It is also possible to requires a sub-transaction by passing # :requires_new => true. If anything goes wrong, the -- GitLab