Permalink
Browse files

Move requiring engine out of the switch case

  • Loading branch information...
1 parent 9935c30 commit b7476767e608a1835dde5acdb43db2b9c55ce3f8 Stefan Sprenger committed May 27, 2011
Showing with 3 additions and 4 deletions.
  1. +3 −4 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'

0 comments on commit b747676

Please sign in to comment.