Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

return argv from the insert method

  • Loading branch information...
commit 36ea8e6a3bb75753dd64032d1a8ebff0ffcdca68 1 parent 22dafbb
@tenderlove tenderlove authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 railties/lib/rails/generators/rails/app/app_generator.rb
View
5 railties/lib/rails/generators/rails/app/app_generator.rb
@@ -351,7 +351,6 @@ def handle_rails_rc!(argv)
argv.reject { |arg| arg == '--no-rc' }
else
insert_railsrc_into_argv!(argv, railsrc(argv))
- argv
end
end
@@ -368,7 +367,9 @@ def insert_railsrc_into_argv!(argv, railsrc)
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
Please sign in to comment.
Something went wrong with that request. Please try again.