aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorSam Granieri <sam@samgranieri.com>2010-01-13 18:38:22 -0600
committerPratik Naik <pratiknaik@gmail.com>2010-01-16 20:55:22 +0530
commit488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4 (patch)
tree287df81a2283fc84a55394be0683d7282abb5852 /railties
parent92f49b5f1ebf42514c58e1fda87c0b8a1b33d08f (diff)
downloadrails-488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4.tar.gz
rails-488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4.tar.bz2
rails-488b4c8c5c8e441c0aaaa9d4f71263dd3beacde4.zip
Make script/dbconsole work again [#3690 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/commands/dbconsole.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb
index b836a17a49..593e2d8ee3 100644
--- a/railties/lib/rails/commands/dbconsole.rb
+++ b/railties/lib/rails/commands/dbconsole.rb
@@ -34,8 +34,8 @@ 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)[env]
- abort "No database is configured for the environment '#{env}'"
+ unless config = YAML::load(ERB.new(IO.read("#{@app.root}/config/database.yml")).result)[Rails.env]
+ abort "No database is configured for the environment '#{Rails.env}'"
end