Permalink
Browse files

dbconsole: Use the app's database_configuration instead of duplicatin…

…g code.
  • Loading branch information...
kommen committed Dec 14, 2011
1 parent 665ef11 commit 6cbe2709d60d10b6e4f7fd7fa22517d68cc47c9f
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 6cbe270

Please sign in to comment.