Permalink
Browse files

db:fixtures:load refactoring: remove unnecessary loop

`ActiveRecord::FixtureSet.create_fixtures` can accept an array of
fixture_files.
  • Loading branch information...
1 parent 5a4df80 commit d20b8699e9ba67182f1fc9bbe71bbe8da054370f @DNNX DNNX committed Jun 25, 2014
Showing with 1 addition and 3 deletions.
  1. +1 −3 activerecord/lib/active_record/railties/databases.rake
@@ -203,9 +203,7 @@ db_namespace = namespace :db do
Dir["#{fixtures_dir}/**/*.yml"].map {|f| f[(fixtures_dir.size + 1)..-5] }
end
- fixture_files.each do |fixture_file|
- ActiveRecord::FixtureSet.create_fixtures(fixtures_dir, fixture_file)
- end
+ ActiveRecord::FixtureSet.create_fixtures(fixtures_dir, fixture_files)
end
# desc "Search for a fixture given a LABEL or ID. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures."

0 comments on commit d20b869

Please sign in to comment.