diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2013-09-07 22:50:54 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2013-09-13 18:02:25 +0200 |
commit | 47ac67b8d4f77e22ce1cae5c7bf836b0d6325d1e (patch) | |
tree | d954217147e544d6259711710256d5126fcf0baf /railties/lib/rails/generators/app_base.rb | |
parent | ca50043a7ad95825b3830d97294b14b665a7d698 (diff) | |
download | rails-47ac67b8d4f77e22ce1cae5c7bf836b0d6325d1e.tar.gz rails-47ac67b8d4f77e22ce1cae5c7bf836b0d6325d1e.tar.bz2 rails-47ac67b8d4f77e22ce1cae5c7bf836b0d6325d1e.zip |
Don't require using application_name before options
Before this commit options for `rails new` and `rails plugin new` had to
be passed in a strict order, trying to execute a following command:
rails new -J path/to/app
resulted in an error.
This commit fixes the situation and allows to pass path to app anywhere
after `new`
Diffstat (limited to 'railties/lib/rails/generators/app_base.rb')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index fb495c918c..6f1b7e2218 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -18,6 +18,10 @@ module Rails argument :app_path, type: :string + def self.strict_args_position + false + end + def self.add_shared_options_for(name) class_option :template, type: :string, aliases: '-m', desc: "Path to some #{name} template (can be a filesystem path or URL)" |