Skip to content
Browse files

Merge pull request #8586 from balexand/cache_digests_regex

Digestor explicit dependency should not contain trailing whitespace
  • Loading branch information...
2 parents f9da785 + 749a745 commit 8a39d8331114c73805d5ce989a72763d23bc55b1 @rafaelfranca rafaelfranca committed Dec 21, 2012
View
2 actionpack/lib/action_view/digestor.rb
@@ -2,7 +2,7 @@
module ActionView
class Digestor
- EXPLICIT_DEPENDENCY = /# Template Dependency: ([^ ]+)/
+ EXPLICIT_DEPENDENCY = /# Template Dependency: (\S+)/
# Matches:
# render partial: "comments/comment", collection: commentable.comments
View
6 actionpack/test/fixtures/digestor/messages/show.html.erb
@@ -6,4 +6,8 @@
<%= render @message.history.events %>
-<%# render "something_missing" %>
+<%# render "something_missing" %>
+
+<%
+ # Template Dependency: messages/form
+%>
View
6 actionpack/test/template/digestor_test.rb
@@ -46,6 +46,12 @@ def test_explicit_dependency
end
end
+ def test_explicit_dependency_in_multiline_erb_tag
+ assert_digest_difference("messages/show") do
+ change_template("messages/_form")
+ end
+ end
+
def test_second_level_dependency
assert_digest_difference("messages/show") do
change_template("comments/_comments")

0 comments on commit 8a39d83

Please sign in to comment.
Something went wrong with that request. Please try again.