Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3979 from kommen/dbconsole_db_config

dbconsole: Use the app's database_configuration instead of duplicating loading code.
  • Loading branch information...
commit a5589db063e0f527357f6be338adecf4716e6b47 2 parents 665ef11 + 6cbe270
@drogus drogus authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/commands/dbconsole.rb
View
2  railties/lib/rails/commands/dbconsole.rb
@@ -41,7 +41,7 @@ def start
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
Please sign in to comment.
Something went wrong with that request. Please try again.