From: Robert Klemme Date: 2010-01-29T17:23:43+09:00 Subject: Re: ActiveRecord::Rollback Config Help 2010/1/28 kels0n : > class TestRollback < ActiveRecord::Base > end > > ActiveRecord::Base.establish_connection( >  :adapter => 'sqlserver', >  :username => 'user', >  :password => 'pass', >  :database => 'testdb', >  :host => 'localhost' > ) > > TestRollback.transaction do >  TestRollback.create(:name => 'Test') >  raise ActiveRecord::Rollback > end > > TestRollback.find(:all)  # returns [#] > > The only difference between this configuration and my one at home is I > don't have version 1.15.6 of the activerecord gem installed on my home > machine.  However, this script needs to use that version of > activerecord because of some legacy code that I inherited and haven't > had a chance to rewrite.  I'm hoping there's a way around this without > having to rewrite the code. > > Any ideas? I can't help you with AR but just making sure we exclude the easy mistakes which still happen all the time: you have verified that the record in question is not in the table before the TX starts, did you? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/