aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-02-03 10:32:27 +0100
committerJosé Valim <jose.valim@gmail.com>2010-02-03 10:32:27 +0100
commitb13504303b26a07f95f26ab6efe41f3bc0740a69 (patch)
treee3b92e910ce71e87487eb31bb091700ddff3ae09 /railties/lib/rails/commands
parent80e49354f17853130dd2ae5815d71d192c8ec9d7 (diff)
parentf390eade5fd70615ba2ee8e089821bcf2d5f7b17 (diff)
downloadrails-b13504303b26a07f95f26ab6efe41f3bc0740a69.tar.gz
rails-b13504303b26a07f95f26ab6efe41f3bc0740a69.tar.bz2
rails-b13504303b26a07f95f26ab6efe41f3bc0740a69.zip
Merge remote branch 'mikel/master'
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r--railties/lib/rails/commands/rails.rb17
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'