Permalink
Browse files

Merge pull request #6 from zilkey/master

Fixes for Rails 2 / Foreign Keys / Empty fixture directories
  • Loading branch information...
2 parents b2a7b1c + 9e03894 commit 2d96ffd7d174e294477d08f81a28210411701315 @rdy committed Sep 19, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/fixture_builder/builder.rb
@@ -54,7 +54,9 @@ def clean_out_old_data
end
def delete_tables
- tables.each { |t| ActiveRecord::Base.connection.delete(delete_sql % ActiveRecord::Base.connection.quote_table_name(t)) }
+ ActiveRecord::Base.connection.disable_referential_integrity do
+ tables.each { |t| ActiveRecord::Base.connection.delete(delete_sql % ActiveRecord::Base.connection.quote_table_name(t)) }
+ end
end
def delete_yml_files

0 comments on commit 2d96ffd

Please sign in to comment.