Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move requiring engine out of the switch case

  • Loading branch information...
commit b7476767e608a1835dde5acdb43db2b9c55ce3f8 1 parent 9935c30
@flippingbits authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 railties/lib/rails/engine/commands.rb
View
7 railties/lib/rails/engine/commands.rb
@@ -9,14 +9,13 @@
command = ARGV.shift
command = aliases[command] || command
+require ENGINE_PATH
+engine = ::Rails::Engine.find(ENGINE_ROOT)
+
case command
when 'generate'
require 'rails/generators'
-
- require ENGINE_PATH
- engine = ::Rails::Engine.find(ENGINE_ROOT)
engine.load_generators
-
require 'rails/commands/generate'
when '--version', '-v'
Please sign in to comment.
Something went wrong with that request. Please try again.