diff options
author | Manuel Menezes de Sequeira <MMSequeira@gmail.com> | 2011-10-05 22:14:49 +0100 |
---|---|---|
committer | Manuel Menezes de Sequeira <MMSequeira@gmail.com> | 2011-10-05 22:14:49 +0100 |
commit | 07343d2974ab77bfd21c0f35930cd394ba5b164e (patch) | |
tree | c64f8b54507d41ccb2c59cb096ee8b1f2a31e2df /railties/lib/rails/commands/application.rb | |
parent | 8d775d5f1d58e5c0d881383e8c6e869d1d360c8c (diff) | |
parent | d6c7185d77158caee933e84b247e37bb6a67bf58 (diff) | |
download | rails-07343d2974ab77bfd21c0f35930cd394ba5b164e.tar.gz rails-07343d2974ab77bfd21c0f35930cd394ba5b164e.tar.bz2 rails-07343d2974ab77bfd21c0f35930cd394ba5b164e.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/lib/rails/commands/application.rb')
-rw-r--r-- | railties/lib/rails/commands/application.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb index 1cf23a8b92..60d1aed73a 100644 --- a/railties/lib/rails/commands/application.rb +++ b/railties/lib/rails/commands/application.rb @@ -9,6 +9,14 @@ if ARGV.first != "new" ARGV[0] = "--help" else ARGV.shift + railsrc = File.join(File.expand_path("~"), ".railsrc") + if File.exist?(railsrc) + extra_args_string = File.open(railsrc).read + extra_args = extra_args_string.split(/\n+/).map {|l| l.split}.flatten + puts "Using #{extra_args.join(" ")} from #{railsrc}" + ARGV << extra_args + ARGV.flatten! + end end require 'rubygems' if ARGV.include?("--dev") |