Skip to content
Browse files

Refactor --rc option

  • Loading branch information...
1 parent 9cb386d commit 784ed154c3d1d9b6e7f0202dcf10d76d938849b0 @guilleiguaran guilleiguaran committed Feb 2, 2013
Showing with 1 addition and 6 deletions.
  1. +1 −6 railties/lib/rails/commands/application.rb
View
7 railties/lib/rails/commands/application.rb
@@ -11,12 +11,7 @@
ARGV.shift
unless ARGV.delete("--no-rc")
customrc = ARGV.index('--rc')
- railsrc = if customrc
- ARGV.delete_at(customrc)
- ARGV.delete_at(customrc)
- else
- File.join(File.expand_path("~"), '.railsrc')
- end
+ railsrc = customrc ? ARGV.slice!(customrc, 2).last : File.join(File.expand_path("~"), '.railsrc')
if File.exist?(railsrc)
extra_args_string = File.read(railsrc)
extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten

0 comments on commit 784ed15

Please sign in to comment.
Something went wrong with that request. Please try again.