diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2011-01-12 15:18:45 -0800 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-06 18:45:42 -0200 |
commit | a3f5d7159d00a0c7c7d79d15652028ac13df30af (patch) | |
tree | 53b18592ac740b729ba6a6ff855c145182f52458 /activerecord/lib/active_record/railties | |
parent | 10cab35d3b9e87e4b182162f7783c220cf2a937f (diff) | |
download | rails-a3f5d7159d00a0c7c7d79d15652028ac13df30af.tar.gz rails-a3f5d7159d00a0c7c7d79d15652028ac13df30af.tar.bz2 rails-a3f5d7159d00a0c7c7d79d15652028ac13df30af.zip |
fix db:fixtures:load with FIXTURES specified [#6061 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 49d4b8f76b..ff36814684 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -296,8 +296,8 @@ db_namespace = namespace :db do base_dir = ENV['FIXTURES_PATH'] ? File.join(Rails.root, ENV['FIXTURES_PATH']) : File.join(Rails.root, 'test', 'fixtures') fixtures_dir = ENV['FIXTURES_DIR'] ? File.join(base_dir, ENV['FIXTURES_DIR']) : base_dir - (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/).map {|f| File.join(fixtures_dir, f) } : Dir["#{fixtures_dir}/**/*.{yml,csv}"]).each do |fixture_file| - Fixtures.create_fixtures(fixtures_dir, fixture_file[(fixtures_dir.size + 1)..-5]) + (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir["#{fixtures_dir}/**/*.{yml,csv}"].map {|f| f[(fixtures_dir.size + 1)..-5] }).each do |fixture_file| + Fixtures.create_fixtures(fixtures_dir, fixture_file) end end |