Permalink
Browse files

Merge pull request #7951 from Grandrath/patch-1

Use `Rails.env` instead of `ENV['RAILS_ENV']`.
Fix behavior of `rake db:structure:load`.
  • Loading branch information...
2 parents bfc6c17 + 5042eda commit c869ce02265299994df4c2333228d1be7538a665 @carlosantoniodasilva carlosantoniodasilva committed Oct 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/railties/databases.rake
@@ -307,7 +307,7 @@ db_namespace = namespace :db do
# desc "Recreate the databases from the structure.sql file"
task :load => [:environment, :load_config] do
- current_config = ActiveRecord::Tasks::DatabaseTasks.current_config(:env => (ENV['RAILS_ENV'] || 'test'))
+ current_config = ActiveRecord::Tasks::DatabaseTasks.current_config
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql")
case current_config['adapter']
when /mysql/, /postgresql/, /sqlite/

0 comments on commit c869ce0

Please sign in to comment.