diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2011-12-14 05:48:04 -0800 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2011-12-14 05:48:04 -0800 |
commit | a5589db063e0f527357f6be338adecf4716e6b47 (patch) | |
tree | d7adf603fb2b7121069996f27730e490029b023e /railties | |
parent | 665ef116ac9000d514c03fc61b216513f5cb7b25 (diff) | |
parent | 6cbe2709d60d10b6e4f7fd7fa22517d68cc47c9f (diff) | |
download | rails-a5589db063e0f527357f6be338adecf4716e6b47.tar.gz rails-a5589db063e0f527357f6be338adecf4716e6b47.tar.bz2 rails-a5589db063e0f527357f6be338adecf4716e6b47.zip |
Merge pull request #3979 from kommen/dbconsole_db_config
dbconsole: Use the app's database_configuration instead of duplicating loading code.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/dbconsole.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index 4b0acc9d88..d425c9db6c 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -41,7 +41,7 @@ module Rails abort opt.to_s unless (0..1).include?(ARGV.size) end - unless config = YAML::load(ERB.new(IO.read("#{@app.root}/config/database.yml")).result)[Rails.env] + unless config = @app.config.database_configuration[Rails.env] abort "No database is configured for the environment '#{Rails.env}'" end |