diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-12-16 20:10:21 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-12-17 14:01:25 -0500 |
commit | fa69b2c03582f5817572050a4373e365d9071b5d (patch) | |
tree | 0f53d11d1d0431f59ac04f2f39e8f6d0222a36ef /railties/lib/rails/commands | |
parent | e3802f961756aac58d9b4392bf2e73813b09f469 (diff) | |
download | rails-fa69b2c03582f5817572050a4373e365d9071b5d.tar.gz rails-fa69b2c03582f5817572050a4373e365d9071b5d.tar.bz2 rails-fa69b2c03582f5817572050a4373e365d9071b5d.zip |
`ARGV.shift` before calling Rails generators
Gems like rspec-rails depend on `ARGV` being shifted, and `scaffold`
(for example) not being the first item in `ARGV`. This should allow
rspec-rails to be passing on Rails master.
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r-- | railties/lib/rails/commands/generate/generate_command.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/generate/generate_command.rb b/railties/lib/rails/commands/generate/generate_command.rb index 59b2febc43..aa8dab71b0 100644 --- a/railties/lib/rails/commands/generate/generate_command.rb +++ b/railties/lib/rails/commands/generate/generate_command.rb @@ -14,6 +14,8 @@ module Rails require_application_and_environment! load_generators + ARGV.shift + Rails::Generators.invoke generator, args, behavior: :invoke, destination_root: Rails::Command.root end end |