diff options
Diffstat (limited to 'railties/bin/gen')
-rwxr-xr-x | railties/bin/gen | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/railties/bin/gen b/railties/bin/gen index a6363edd54..9f105d2e19 100755 --- a/railties/bin/gen +++ b/railties/bin/gen @@ -26,8 +26,6 @@ if ARGV.size == 0 puts "Others: #{others.join(', ')}." unless others.empty? exit -elsif ARGV.size == 1 - ARGV << "--help" end Rails::Generators.builtin.each do |group, name| @@ -37,6 +35,7 @@ end name = ARGV.shift if klass = Rails::Generators.find_by_namespace(name, "rails") + ARGV << "--help" if klass.arguments.any? { |a| a.required? } && ARGV.empty? klass.start else puts "Could not find generator #{name}." |