aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-06-03 23:47:44 +1000
committerMikel Lindsaar <raasdnil@gmail.com>2010-06-03 23:47:44 +1000
commit06892c34213659ed8734ac250ee5846273e277d6 (patch)
tree8d7f9d8348bdb286693af8e8212bf79637664163 /railties/lib/rails/commands
parentab34b7bde1c981f8e65b80b82d7d34cf24ea2b83 (diff)
downloadrails-06892c34213659ed8734ac250ee5846273e277d6.tar.gz
rails-06892c34213659ed8734ac250ee5846273e277d6.tar.bz2
rails-06892c34213659ed8734ac250ee5846273e277d6.zip
Changing command line API from 'rails blog' to 'rails new blog'.
Also removed the limitation of not being able to call your new server any of the rails commands (generate, server, dbconsole, console etc) as there is no longer any ambiguity here. http://rails.lighthouseapp.com/projects/8994/tickets/4665
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r--railties/lib/rails/commands/application.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb
index 8a8143e00e..a3a5aed399 100644
--- a/railties/lib/rails/commands/application.rb
+++ b/railties/lib/rails/commands/application.rb
@@ -4,7 +4,12 @@ if %w(--version -v).include? ARGV.first
exit(0)
end
-ARGV << "--help" if ARGV.empty?
+if ARGV.first != "new" || ARGV.empty?
+ ARGV[0] = "--help"
+else
+ ARGV.shift
+end
+
require 'rubygems' if ARGV.include?("--dev")
require 'rails/generators'