diff options
author | Viktar Basharymau <viktar.basharymau@thehamon.com> | 2014-06-25 12:34:21 +0300 |
---|---|---|
committer | Viktar Basharymau <viktar.basharymau@thehamon.com> | 2014-06-27 17:46:47 +0300 |
commit | 13ff102c8439c683fb34371a0672d7b48e110d1f (patch) | |
tree | d7f37fdc310f5f5f7fb1c8e0674c540dbbdbcec5 /activerecord/lib/active_record/railties | |
parent | 8d541fc20282bb8cb2ab6a8762987c4e95bf2c51 (diff) | |
download | rails-13ff102c8439c683fb34371a0672d7b48e110d1f.tar.gz rails-13ff102c8439c683fb34371a0672d7b48e110d1f.tar.bz2 rails-13ff102c8439c683fb34371a0672d7b48e110d1f.zip |
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.
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 5ffa09f1e1..695ae2ae41 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/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 |