diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-21 23:52:44 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-21 23:52:44 -0800 |
commit | 8a39d8331114c73805d5ce989a72763d23bc55b1 (patch) | |
tree | 23e586eb0d2c7284c2600d01237187ce29511248 /actionpack | |
parent | f9da785d0b1b22317cfca25c15fb555e9016accb (diff) | |
parent | 749a745264283babcff72c8303e185d793cc6eb9 (diff) | |
download | rails-8a39d8331114c73805d5ce989a72763d23bc55b1.tar.gz rails-8a39d8331114c73805d5ce989a72763d23bc55b1.tar.bz2 rails-8a39d8331114c73805d5ce989a72763d23bc55b1.zip |
Merge pull request #8586 from balexand/cache_digests_regex
Digestor explicit dependency should not contain trailing whitespace
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/digestor.rb | 2 | ||||
-rw-r--r-- | actionpack/test/fixtures/digestor/messages/show.html.erb | 6 | ||||
-rw-r--r-- | actionpack/test/template/digestor_test.rb | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/digestor.rb b/actionpack/lib/action_view/digestor.rb index 8bc69b9246..f3f6b425a8 100644 --- a/actionpack/lib/action_view/digestor.rb +++ b/actionpack/lib/action_view/digestor.rb @@ -2,7 +2,7 @@ require 'thread_safe' module ActionView class Digestor - EXPLICIT_DEPENDENCY = /# Template Dependency: ([^ ]+)/ + EXPLICIT_DEPENDENCY = /# Template Dependency: (\S+)/ # Matches: # render partial: "comments/comment", collection: commentable.comments diff --git a/actionpack/test/fixtures/digestor/messages/show.html.erb b/actionpack/test/fixtures/digestor/messages/show.html.erb index 9f73345a9f..51b3b61e8e 100644 --- a/actionpack/test/fixtures/digestor/messages/show.html.erb +++ b/actionpack/test/fixtures/digestor/messages/show.html.erb @@ -6,4 +6,8 @@ <%= render @message.history.events %> -<%# render "something_missing" %>
\ No newline at end of file +<%# render "something_missing" %> + +<% + # Template Dependency: messages/form +%>
\ No newline at end of file diff --git a/actionpack/test/template/digestor_test.rb b/actionpack/test/template/digestor_test.rb index f493c8201d..02b1fd87a8 100644 --- a/actionpack/test/template/digestor_test.rb +++ b/actionpack/test/template/digestor_test.rb @@ -46,6 +46,12 @@ class TemplateDigestorTest < ActionView::TestCase 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") |