diff options
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/template_runner.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails_generator/generators/applications/app/template_runner.rb b/railties/lib/rails_generator/generators/applications/app/template_runner.rb index 0083e0d5a5..d9261ebe8f 100644 --- a/railties/lib/rails_generator/generators/applications/app/template_runner.rb +++ b/railties/lib/rails_generator/generators/applications/app/template_runner.rb @@ -233,11 +233,11 @@ module Rails # # generate(:authenticated, "user session") # - def generate(what, args = nil) + def generate(what, *args) puts "generating #{what}" - args = args.join(" ") if args.class == Array + argument = args.map(&:to_s).flatten.join(" ") - in_root { `#{root}/script/generate #{what} #{args}` } + in_root { `#{root}/script/generate #{what} #{argument}` } end # Executes a command |