diff options
Diffstat (limited to 'actionpack')
4 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/digestor.rb b/actionpack/lib/action_view/digestor.rb index 5d3add4091..f5852dbe73 100644 --- a/actionpack/lib/action_view/digestor.rb +++ b/actionpack/lib/action_view/digestor.rb @@ -64,7 +64,7 @@ module ActionView end def directory - name.split("/").first + name.split("/")[0..-2].join("/") end def partial? diff --git a/actionpack/test/fixtures/digestor/level/below/_header.html.erb b/actionpack/test/fixtures/digestor/level/below/_header.html.erb new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/actionpack/test/fixtures/digestor/level/below/_header.html.erb diff --git a/actionpack/test/fixtures/digestor/level/below/index.html.erb b/actionpack/test/fixtures/digestor/level/below/index.html.erb new file mode 100644 index 0000000000..b92f49a8f8 --- /dev/null +++ b/actionpack/test/fixtures/digestor/level/below/index.html.erb @@ -0,0 +1 @@ +<%= render partial: "header" %> diff --git a/actionpack/test/template/digestor_test.rb b/actionpack/test/template/digestor_test.rb index 01b101cb49..8181aa11f7 100644 --- a/actionpack/test/template/digestor_test.rb +++ b/actionpack/test/template/digestor_test.rb @@ -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 |