Permalink
Browse files

Ensure the full path is used when searching for layouts [#1803 state:…

…resolved]
  • Loading branch information...
1 parent 5fe6635 commit a1ac635d9655cd26f86593263c3e9b956d330141 @josh josh committed Jan 27, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/layout.rb
@@ -179,7 +179,7 @@ def default_layout(format) #:nodoc:
end
def layout_list #:nodoc:
- Array(view_paths).sum([]) { |path| Dir["#{path}/layouts/**/*"] }
+ Array(view_paths).sum([]) { |path| Dir["#{path.to_str}/layouts/**/*"] }
end
def find_layout(layout, *formats) #:nodoc:

4 comments on commit a1ac635

Member

mislav replied Jan 27, 2009

I don’t like that you used `to_str` here because of its drastic difference compared to `to_s` which may not be obvious to other people.

What are the semantic differences between `to_str` and `to_s` anyway? You should have used `path`.

Contributor

alloy replied Jan 27, 2009

On the difference between the 2: http://www.informit.com/articles/article.aspx?p=683059&seqNum=16

Contributor

alloy replied Jan 27, 2009

Ugh, here it is correctly: http://is.gd/hqBO

I actually wonder where the test is for this change?

Contributor

alloy replied Jan 27, 2009

Oh my, I fail again… http://is.gd/hqCo

Please sign in to comment.