diff options
author | Alvaro Pereyra <alvaro@xendacentral.com> | 2012-05-28 02:29:46 -0500 |
---|---|---|
committer | Alvaro Pereyra <alvaro@xendacentral.com> | 2012-05-28 02:29:46 -0500 |
commit | 72973a30704894c808836d80a001208c1af39e7c (patch) | |
tree | ab84954fed3e67628bb0884b0e4b0376638bc5dc /railties/lib/rails/commands/dbconsole.rb | |
parent | 011863673a353c334ddb2c93227dceadc5d7c3b6 (diff) | |
parent | 0ad2146ccf45b3a26924e729a92cd2ff98356413 (diff) | |
download | rails-72973a30704894c808836d80a001208c1af39e7c.tar.gz rails-72973a30704894c808836d80a001208c1af39e7c.tar.bz2 rails-72973a30704894c808836d80a001208c1af39e7c.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/lib/rails/commands/dbconsole.rb')
-rw-r--r-- | railties/lib/rails/commands/dbconsole.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index aaba47117f..cc7caffc3d 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -42,7 +42,7 @@ module Rails include_password = false options = {} OptionParser.new do |opt| - opt.banner = "Usage: dbconsole [environment] [options]" + opt.banner = "Usage: rails dbconsole [environment] [options]" opt.on("-p", "--include-password", "Automatically provide the password from database.yml") do |v| include_password = true end @@ -56,6 +56,11 @@ module Rails options['header'] = h end + opt.on("-h", "--help", "Show this help message.") do + puts opt + exit + end + opt.parse!(arguments) abort opt.to_s unless (0..1).include?(arguments.size) end @@ -96,7 +101,7 @@ module Rails args << "-#{options['mode']}" if options['mode'] args << "-header" if options['header'] - args << config['database'] + args << File.expand_path(config['database'], Rails.root) find_cmd_and_exec('sqlite3', *args) |