diff options
author | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-05-27 08:46:32 +0200 |
---|---|---|
committer | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-05-27 08:46:57 +0200 |
commit | b7476767e608a1835dde5acdb43db2b9c55ce3f8 (patch) | |
tree | 8d52e0577eeff880608a1cb74e2ffc13fa7ba3c6 /railties/lib | |
parent | 9935c308f14df1eab1e1334dc007bae999dab92f (diff) | |
download | rails-b7476767e608a1835dde5acdb43db2b9c55ce3f8.tar.gz rails-b7476767e608a1835dde5acdb43db2b9c55ce3f8.tar.bz2 rails-b7476767e608a1835dde5acdb43db2b9c55ce3f8.zip |
Move requiring engine out of the switch case
Diffstat (limited to 'railties/lib')
-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' |