diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-03 19:50:51 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-03 19:50:51 +1100 |
commit | f390eade5fd70615ba2ee8e089821bcf2d5f7b17 (patch) | |
tree | e3b92e910ce71e87487eb31bb091700ddff3ae09 /railties/lib | |
parent | 38d13f9597c4e92643e3b6513e85a7a8475d5b1b (diff) | |
download | rails-f390eade5fd70615ba2ee8e089821bcf2d5f7b17.tar.gz rails-f390eade5fd70615ba2ee8e089821bcf2d5f7b17.tar.bz2 rails-f390eade5fd70615ba2ee8e089821bcf2d5f7b17.zip |
Adding 'db' as a shortcut for dbconsole to the rails command
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/rails.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/railties/lib/rails/commands/rails.rb b/railties/lib/rails/commands/rails.rb index 5f34876f1d..9597e2e7e6 100644 --- a/railties/lib/rails/commands/rails.rb +++ b/railties/lib/rails/commands/rails.rb @@ -6,13 +6,14 @@ HELP_TEXT = <<-EOT usage: rails COMMAND [ARGS] The most common rails commands are: - generate Generate new code (short-cut alias: "g") - console Start the Rails console (short-cut alias: "c") - server Start the Rails server (short-cut alias: "s") + generate Generate new code (short-cut alias: "g") + console Start the Rails console (short-cut alias: "c") + server Start the Rails server (short-cut alias: "s") + dbconsole Start a console for the database specified in config/database.yml + (short-cut alias: "db") In addition to those, there are: application Generate the Rails application code - dbconsole Start a console for the database specified in config/database.yml destroy Undo code generated with "generate" benchmarker See how fast a piece of code runs profiler Get profile information from a piece of code @@ -35,13 +36,13 @@ when 's', 'server' require 'rails/commands/server' Dir.chdir(ROOT_PATH) Rails::Server.start - -when 'application' - require 'rails/commands/application' -when 'dbconsole' +when 'db', 'dbconsole' require 'rails/commands/dbconsole' require APP_PATH Rails::DBConsole.start(Rails::Application) + +when 'application' + require 'rails/commands/application' when 'destroy' require ENV_PATH require 'rails/commands/destroy' |