aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
authorrobertomiranda <rjmaltamar@gmail.com>2013-02-04 12:57:12 -0500
committerrobertomiranda <rjmaltamar@gmail.com>2013-02-04 16:05:38 -0500
commit51030364ec2b5f74381725aa49f73af34d690f8c (patch)
tree4fa53fb1844ed96635a95fd0fc2b48f971286d61 /railties/lib/rails/commands
parent65113fd2c8d5bcee2fab60d28ccdb912ceaa4367 (diff)
downloadrails-51030364ec2b5f74381725aa49f73af34d690f8c.tar.gz
rails-51030364ec2b5f74381725aa49f73af34d690f8c.tar.bz2
rails-51030364ec2b5f74381725aa49f73af34d690f8c.zip
Use --rc= instead of --rc
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r--railties/lib/rails/commands/application.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb
index 7d84d3ae0e..2ff29418c6 100644
--- a/railties/lib/rails/commands/application.rb
+++ b/railties/lib/rails/commands/application.rb
@@ -10,8 +10,12 @@ if ARGV.first != "new"
else
ARGV.shift
unless ARGV.delete("--no-rc")
- customrc = ARGV.index('--rc')
- railsrc = customrc ? ARGV.slice!(customrc, 2).last : File.join(File.expand_path("~"), '.railsrc')
+ customrc = ARGV.index{ |x| x.include?("--rc=") }
+ railsrc = if customrc
+ File.expand_path(ARGV.delete_at(customrc).gsub(/--rc=/, ""))
+ else
+ File.join(File.expand_path("~"), '.railsrc')
+ end
if File.exist?(railsrc)
extra_args_string = File.read(railsrc)
extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten