diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/application.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb index 8c1b20571c..92c9f9deb9 100644 --- a/railties/lib/rails/commands/application.rb +++ b/railties/lib/rails/commands/application.rb @@ -10,7 +10,13 @@ if ARGV.first != "new" else ARGV.shift unless ARGV.delete("--no-rc") - railsrc = File.join(File.expand_path("~"), ".railsrc") + customrc = ARGV.index('--rc') + railsrc = if customrc + ARGV.delete_at(customrc) + ARGV.delete_at(customrc) + 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 |