Permalink
Browse files

Allow for deep directory path for view templates.

  • Loading branch information...
1 parent 888a7a5 commit 2938ef7a65be5527905174b348b58c98a06d20e4 @mrship mrship committed Oct 11, 2012
View
2 actionpack/lib/action_view/digestor.rb
@@ -64,7 +64,7 @@ def logical_name
end
def directory
- name.split("/").first
+ name.split("/")[0..-2].join("/")
end
def partial?
View
0 actionpack/test/fixtures/digestor/level/below/_header.html.erb
No changes.
View
1 actionpack/test/fixtures/digestor/level/below/index.html.erb
@@ -0,0 +1 @@
+<%= render partial: "header" %>
View
6 actionpack/test/template/digestor_test.rb
@@ -59,6 +59,12 @@ def test_third_level_dependency
change_template("comments/_comment")
end
end
+
+ def test_directory_depth_dependency
+ assert_digest_difference("level/below/index") do
+ change_template("level/below/_header")
+ end
+ end
def test_logging_of_missing_template
assert_logged "Couldn't find template for digesting: messages/something_missing.html" do

0 comments on commit 2938ef7

Please sign in to comment.