diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-06-05 04:37:05 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-06-05 04:37:05 +0000 |
commit | 8d6d450303235101a66624691e98986e0a8d6ff6 (patch) | |
tree | bde0b946c55085fb0529da11a6b650c25d58a10e /activerecord/lib | |
parent | 255b913637ede72b250b36abba033de2518c4969 (diff) | |
download | rails-8d6d450303235101a66624691e98986e0a8d6ff6.tar.gz rails-8d6d450303235101a66624691e98986e0a8d6ff6.tar.bz2 rails-8d6d450303235101a66624691e98986e0a8d6ff6.zip |
Fixtures: correctly delete and insert fixtures in a single transaction. Closes #8553.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 0a8b75e014..61a5ef2af8 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -255,7 +255,7 @@ class Fixtures < YAML::Omap all_loaded_fixtures.merge! fixtures_map - connection.transaction(Thread.current['open_transactions'] == 0) do + connection.transaction(Thread.current['open_transactions'].to_i == 0) do fixtures.reverse.each { |fixture| fixture.delete_existing_fixtures } fixtures.each { |fixture| fixture.insert_fixtures } |