aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-19 12:55:22 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-19 12:55:22 +0000
commitd19b1810db071ac9b4f8e8eb954ea539b0295df9 (patch)
treec38ad33589ba0b77c5a882c8a34185b28f508ef6
parent01f05551c0cbec5c4be93ee6d9f1db48dfba892c (diff)
downloadrails-d19b1810db071ac9b4f8e8eb954ea539b0295df9.tar.gz
rails-d19b1810db071ac9b4f8e8eb954ea539b0295df9.tar.bz2
rails-d19b1810db071ac9b4f8e8eb954ea539b0295df9.zip
Added support for a -h/--help parameter in the generator #331 [Ulysses]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/CHANGELOG2
-rwxr-xr-xrailties/bin/generate2
2 files changed, 4 insertions, 0 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index f5f8e3296a..043b9edfa3 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added support for a -h/--help parameter in the generator #331 [Ulysses]
+
* File.expand_path in config/environment.rb would fail when dealing with symlinked public directories [mjobin].
diff --git a/railties/bin/generate b/railties/bin/generate
index 8f2f1497d6..1588a306da 100755
--- a/railties/bin/generate
+++ b/railties/bin/generate
@@ -2,6 +2,8 @@
require File.dirname(__FILE__) + '/../config/environment'
require 'rails_generator'
+ARGV.shift unless ARGV.empty? or not ['--help', '-h'].include?(ARGV[0])
+
unless ARGV.empty?
begin
name = ARGV.shift