Hi Will,

On Mon, 2011-10-03 at 17:18 +1300, Will Bryant wrote:
> One of the odd things that's blocking one big app I work on from
> moving up to Rails 3.0 or 3.1 is that with these versions whenever an
> object is saved, a reference to it is retained until the end of the
> enclosing transaction block, so that its state (new_record?, etc.) can
> be rolled back if the transaction is rolled back.
> 
> There are several ways we can fix this

What about adding a :consistent option when opening a transaction? E.g.

# Rolls back record state if the transaction fails
transaction do
  ...
end

# Doesn't roll back record state / keep references
transaction(:consistent => false) do
  ...
end

Then, we could make the transaction around test runs be non-consistent?

Jon

-- 
http://jonathanleighton.com/

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to