aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/commands/dbconsole.rb
diff options
context:
space:
mode:
authorHongli Lai (Phusion) <hongli@phusion.nl>2008-08-08 13:48:30 +0200
committerHongli Lai (Phusion) <hongli@phusion.nl>2008-08-08 13:48:30 +0200
commit920ad94598a9b90d048cb7cb19a34d7cb9e80392 (patch)
tree77e016c3a03fc2ad0cf290e9e38f166b327c1622 /railties/lib/commands/dbconsole.rb
parent62d8a1c84406f8021c74a02fea320cf2fb129adf (diff)
parentd2553c3409843986be2c00394687828195b913dc (diff)
downloadrails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.tar.gz
rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.tar.bz2
rails-920ad94598a9b90d048cb7cb19a34d7cb9e80392.zip
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'railties/lib/commands/dbconsole.rb')
-rw-r--r--railties/lib/commands/dbconsole.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/commands/dbconsole.rb b/railties/lib/commands/dbconsole.rb
index 17acb7b68f..e0a2abe73d 100644
--- a/railties/lib/commands/dbconsole.rb
+++ b/railties/lib/commands/dbconsole.rb
@@ -6,7 +6,7 @@ include_password = false
OptionParser.new do |opt|
opt.banner = "Usage: dbconsole [options] [environment]"
- opt.on("-p", "--include-password", "Automatically provide the database from database.yml") do |v|
+ opt.on("-p", "--include-password", "Automatically provide the password from database.yml") do |v|
include_password = true
end
opt.parse!(ARGV)
@@ -41,6 +41,8 @@ when "mysql"
if config['password'] && include_password
args << "--password=#{config['password']}"
+ elsif config['password'] && !config['password'].empty?
+ args << "-p"
end
args << config['database']