Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #6 from zilkey/master

Fixes for Rails 2 / Foreign Keys / Empty fixture directories
  • Loading branch information...
commit 2d96ffd7d174e294477d08f81a28210411701315 2 parents b2a7b1c + 9e03894
Ryan Dy authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 lib/fixture_builder/builder.rb
4 lib/fixture_builder/builder.rb
@@ -54,7 +54,9 @@ def clean_out_old_data
54 54 end
55 55
56 56 def delete_tables
57   - tables.each { |t| ActiveRecord::Base.connection.delete(delete_sql % ActiveRecord::Base.connection.quote_table_name(t)) }
  57 + ActiveRecord::Base.connection.disable_referential_integrity do
  58 + tables.each { |t| ActiveRecord::Base.connection.delete(delete_sql % ActiveRecord::Base.connection.quote_table_name(t)) }
  59 + end
58 60 end
59 61
60 62 def delete_yml_files

0 comments on commit 2d96ffd

Please sign in to comment.
Something went wrong with that request. Please try again.