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:
parent
888a7a5bdc
commit
2938ef7a65
4 changed files with 8 additions and 1 deletions
|
@ -64,7 +64,7 @@ module ActionView
|
|||
end
|
||||
|
||||
def directory
|
||||
name.split("/").first
|
||||
name.split("/")[0..-2].join("/")
|
||||
end
|
||||
|
||||
def partial?
|
||||
|
|
0
actionpack/test/fixtures/digestor/level/below/_header.html.erb
vendored
Normal file
0
actionpack/test/fixtures/digestor/level/below/_header.html.erb
vendored
Normal file
1
actionpack/test/fixtures/digestor/level/below/index.html.erb
vendored
Normal file
1
actionpack/test/fixtures/digestor/level/below/index.html.erb
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
<%= render partial: "header" %>
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue