diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-06-29 07:53:30 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-06-29 07:53:30 -0700 |
commit | 08f8c8aa52d7cefed7b8fb0ae2cffa3d77d3895f (patch) | |
tree | 3b07c9d3f7d2609b4d97a2160b70b01e98d248d7 | |
parent | 3e0ce665e537d3f1f444a0221456de19eb92882f (diff) | |
parent | 6ce18ba7dcce09401a3b80542a3f12b89e40ac98 (diff) | |
download | rails-08f8c8aa52d7cefed7b8fb0ae2cffa3d77d3895f.tar.gz rails-08f8c8aa52d7cefed7b8fb0ae2cffa3d77d3895f.tar.bz2 rails-08f8c8aa52d7cefed7b8fb0ae2cffa3d77d3895f.zip |
Merge pull request #11176 from schneems/schneems/plugin_new_help_fix
Fix `rails plugin --help`
-rw-r--r-- | railties/CHANGELOG.md | 4 | ||||
-rw-r--r-- | railties/lib/rails/commands.rb | 16 |
2 files changed, 11 insertions, 9 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index eb0545ccbf..639dd70152 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Fix `rails plugin --help` command. + + *Richard Schneeman* + * Omit turbolinks configuration completely on skip_javascript generator option. *Nikita Fedyashev* diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 48007dd2ab..c2ce2b4d2a 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -35,19 +35,17 @@ command = ARGV.shift command = aliases[command] || command case command -when 'generate', 'destroy', 'plugin' +when 'plugin' + require "rails/commands/plugin_new" +when 'generate', 'destroy' require 'rails/generators' - if command == 'plugin' && ARGV.first == 'new' - require "rails/commands/plugin_new" - else - require APP_PATH - Rails.application.require_environment! + require APP_PATH + Rails.application.require_environment! - Rails.application.load_generators + Rails.application.load_generators - require "rails/commands/#{command}" - end + require "rails/commands/#{command}" when 'console' require 'rails/commands/console' |