Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow for deep directory path for view templates.

  • Loading branch information...
commit 2938ef7a65be5527905174b348b58c98a06d20e4 1 parent 888a7a5
@mrship mrship authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.