aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/engine.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 50bba22a3a..4fc23fe277 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -382,9 +382,9 @@ module Rails
# Finds engine with given path
def find(path)
- path = path.to_s
- Rails::Engine::Railties.engines.find { |r|
- File.expand_path(r.root.to_s) == File.expand_path(path)
+ expanded_path = File.expand_path path.to_s
+ Rails::Engine::Railties.engines.find { |engine|
+ File.expand_path(engine.root.to_s) == expanded_path
}
end
end