Skip to content
Browse files

Fixed backward incompatibility for engines.

- Many engines rely on being able to join directories to the Rails root:

    Rails.root.join('somedir')

- This was now impossible because Rails.root returned a String:

    NoMethodError: undefined method `join' for "/code/myrailsapp":String

- This was broken in 4001835
  • Loading branch information...
1 parent 880481a commit 66db0b9440e4db594c951d38f641e1910fd44db3 @parndt committed May 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails/engine.rb
View
2 railties/lib/rails/engine.rb
@@ -652,7 +652,7 @@ def find_root_with_flag(flag, default=nil)
root = File.exist?("#{root_path}/#{flag}") ? root_path : default
raise "Could not find root path for #{self}" unless root
- File.realpath root
+ Pathname.new File.realpath root
end
def default_middleware_stack

0 comments on commit 66db0b9

Please sign in to comment.
Something went wrong with that request. Please try again.