Permalink
Browse files

db:fixtures:{identify,load} tasks respect AR::Tasks::DatabaseTasks.root

Before this commit, if `ENV['FIXTURES_PATH']` was set, then `Rails.root`
was used, otherwise the app used `ActiveRecord::Tasks::DatabaseTasks.root`.

Now it is consistent.
  • Loading branch information...
1 parent 8d541fc commit 13ff102c8439c683fb34371a0672d7b48e110d1f @DNNX DNNX committed Jun 25, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/railties/databases.rake
@@ -190,7 +190,7 @@ db_namespace = namespace :db do
require 'active_record/fixtures'
base_dir = if ENV['FIXTURES_PATH']
- Rails.root.join(ENV['FIXTURES_PATH'])
+ ActiveRecord::Tasks::DatabaseTasks.root.join(ENV['FIXTURES_PATH'])
else
ActiveRecord::Tasks::DatabaseTasks.fixtures_path
end
@@ -212,7 +212,7 @@ db_namespace = namespace :db do
puts %Q(The fixture ID for "#{label}" is #{ActiveRecord::FixtureSet.identify(label)}.) if label
base_dir = if ENV['FIXTURES_PATH']
- Rails.root.join(ENV['FIXTURES_PATH'])
+ ActiveRecord::Tasks::DatabaseTasks.root.join(ENV['FIXTURES_PATH'])
else
ActiveRecord::Tasks::DatabaseTasks.fixtures_path
end

0 comments on commit 13ff102

Please sign in to comment.