1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Allow for deep directory path for view templates.

This commit is contained in:
Andy Shipman 2012-10-11 17:36:58 +01:00
parent 888a7a5bdc
commit 2938ef7a65
4 changed files with 8 additions and 1 deletions

View file

@ -64,7 +64,7 @@ module ActionView
end
def directory
name.split("/").first
name.split("/")[0..-2].join("/")
end
def partial?

View file

@ -0,0 +1 @@
<%= render partial: "header" %>

View file

@ -59,6 +59,12 @@ class TemplateDigestorTest < ActionView::TestCase
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