diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/engine.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 6e5e842370..7c26234750 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -382,7 +382,10 @@ module Rails # Finds engine with given path def find(path) - Rails::Engine::Railties.engines.find { |r| File.expand_path(r.root.to_s) == File.expand_path(path.to_s) } + path = path.to_s + Rails::Engine::Railties.engines.find { |r| + File.expand_path(r.root.to_s) == File.expand_path(path) + } end end |