diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-30 16:33:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-30 16:33:39 -0700 |
commit | 36ea8e6a3bb75753dd64032d1a8ebff0ffcdca68 (patch) | |
tree | 3fcc20f00969d664a22b0c75976c2554c81c7abc /railties | |
parent | 22dafbb65800615e8a3f3a499091b8e33c3d39f7 (diff) | |
download | rails-36ea8e6a3bb75753dd64032d1a8ebff0ffcdca68.tar.gz rails-36ea8e6a3bb75753dd64032d1a8ebff0ffcdca68.tar.bz2 rails-36ea8e6a3bb75753dd64032d1a8ebff0ffcdca68.zip |
return argv from the insert method
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index a4ab0a7fff..b6dbb11a34 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -351,7 +351,6 @@ module Rails argv.reject { |arg| arg == '--no-rc' } else insert_railsrc_into_argv!(argv, railsrc(argv)) - argv end end @@ -368,7 +367,9 @@ module Rails extra_args_string = File.read(railsrc) extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten puts "Using #{extra_args.join(" ")} from #{railsrc}" - argv.insert(1, *extra_args) + [argv.first] + extra_args + argv.drop(1) + else + argv end end end |