diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-12-08 23:25:39 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-12-09 01:59:55 +0100 |
commit | 843130dbe7fb0545db13bdfc163b919cfd0e128f (patch) | |
tree | c2f8662a44438a9fe295f98fb41b6e9b16686f2e /railties | |
parent | 051127d4d38329238bb0b3587ef128f131174786 (diff) | |
download | rails-843130dbe7fb0545db13bdfc163b919cfd0e128f.tar.gz rails-843130dbe7fb0545db13bdfc163b919cfd0e128f.tar.bz2 rails-843130dbe7fb0545db13bdfc163b919cfd0e128f.zip |
Use Rails::Engine.find in commands.rb
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index 338565247f..46363d7921 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -18,8 +18,7 @@ when 'generate', 'destroy', 'plugin' require APP_PATH Rails.application.require_environment! - if defined?(ENGINE_PATH) - engine = Rails.application.railties.engines.find { |r| r.root.to_s == ENGINE_PATH } + if defined?(ENGINE_PATH) && engine = Rails::Engine.find(ENGINE_PATH) Rails.application = engine end |