Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #11176 from schneems/schneems/plugin_new_help_fix

Fix `rails plugin --help`
Conflicts:
	railties/CHANGELOG.md
  • Loading branch information...
commit c2458443f947ab490c1a1a625bd6e2f2f8cdbb9e 1 parent 4d23458
@rafaelfranca rafaelfranca authored
Showing with 11 additions and 9 deletions.
  1. +4 −0 railties/CHANGELOG.md
  2. +7 −9 railties/lib/rails/commands.rb
View
4 railties/CHANGELOG.md
@@ -1,5 +1,9 @@
## unreleased ##
+* Fix `rails plugin --help` command.
+
+ *Richard Schneeman*
+
* Omit turbolinks configuration completely on skip_javascript generator option.
*Nikita Fedyashev*
View
16 railties/lib/rails/commands.rb
@@ -35,19 +35,17 @@
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'
Please sign in to comment.
Something went wrong with that request. Please try again.