diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-08-08 13:48:30 +0200 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-08-08 13:48:30 +0200 |
commit | 920ad94598a9b90d048cb7cb19a34d7cb9e80392 (patch) | |
tree | 77e016c3a03fc2ad0cf290e9e38f166b327c1622 /railties/lib/commands/dbconsole.rb | |
parent | 62d8a1c84406f8021c74a02fea320cf2fb129adf (diff) | |
parent | d2553c3409843986be2c00394687828195b913dc (diff) | |
download | rails-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.rb | 4 |
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'] |