Skip to content
This repository
Browse code

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
Rafael Mendonça França rafaelfranca authored

Showing 2 changed files with 11 additions and 9 deletions. Show diff stats Hide diff stats

  1. +4 0 railties/CHANGELOG.md
  2. +7 9 railties/lib/rails/commands.rb
4 railties/CHANGELOG.md
Source Rendered
... ... @@ -1,5 +1,9 @@
1 1 ## unreleased ##
2 2
  3 +* Fix `rails plugin --help` command.
  4 +
  5 + *Richard Schneeman*
  6 +
3 7 * Omit turbolinks configuration completely on skip_javascript generator option.
4 8
5 9 *Nikita Fedyashev*
16 railties/lib/rails/commands.rb
@@ -35,19 +35,17 @@
35 35 command = aliases[command] || command
36 36
37 37 case command
38   -when 'generate', 'destroy', 'plugin'
  38 +when 'plugin'
  39 + require "rails/commands/plugin_new"
  40 +when 'generate', 'destroy'
39 41 require 'rails/generators'
40 42
41   - if command == 'plugin' && ARGV.first == 'new'
42   - require "rails/commands/plugin_new"
43   - else
44   - require APP_PATH
45   - Rails.application.require_environment!
  43 + require APP_PATH
  44 + Rails.application.require_environment!
46 45
47   - Rails.application.load_generators
  46 + Rails.application.load_generators
48 47
49   - require "rails/commands/#{command}"
50   - end
  48 + require "rails/commands/#{command}"
51 49
52 50 when 'console'
53 51 require 'rails/commands/console'

0 comments on commit c245844

Please sign in to comment.
Something went wrong with that request. Please try again.