diff options
Diffstat (limited to 'railties/lib/rails/generators.rb')
-rw-r--r-- | railties/lib/rails/generators.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 5d95f2fa52..c01018aab2 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -66,6 +66,11 @@ module Rails aliases.deep_merge! config.aliases options.deep_merge! config.options fallbacks.merge! config.fallbacks + templates_path.concat config.templates + end + + def self.templates_path + @templates_path ||= [] end def self.aliases #:nodoc: @@ -161,7 +166,7 @@ module Rails end # Show help message with available generators. - def self.help + def self.help(command = 'generate') lookup! namespaces = subclasses.map{ |k| k.namespace } @@ -173,7 +178,7 @@ module Rails groups[base] << namespace end - puts "Usage: rails generate GENERATOR [args] [options]" + puts "Usage: rails #{command} GENERATOR [args] [options]" puts puts "General options:" puts " -h, [--help] # Print generators options and usage" |