diff options
-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' |