diff options
-rw-r--r-- | railties/lib/rails/engine/commands.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/railties/lib/rails/engine/commands.rb b/railties/lib/rails/engine/commands.rb index 33a7cd5805..b77fef8ffd 100644 --- a/railties/lib/rails/engine/commands.rb +++ b/railties/lib/rails/engine/commands.rb @@ -9,14 +9,13 @@ aliases = { 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' |