aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-06-26 23:01:07 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2015-06-26 23:01:07 +0200
commitf9996803f857afcd6f32e18e63ab0269ac8213e6 (patch)
treec2606dbeec96ea2092c6f5849775f2ae8fa6da90 /actionview/lib
parent4b4075be11753b49b240adbbefead712e83ca1a7 (diff)
parentd51e2eefd5c50cef366ddc96a3b93af0395755f1 (diff)
downloadrails-f9996803f857afcd6f32e18e63ab0269ac8213e6.tar.gz
rails-f9996803f857afcd6f32e18e63ab0269ac8213e6.tar.bz2
rails-f9996803f857afcd6f32e18e63ab0269ac8213e6.zip
Merge pull request #20417 from dubek/fix-template-cache-call-pattern
Improve detection of partial templates eligible for collection caching.
Diffstat (limited to 'actionview/lib')
-rw-r--r--actionview/lib/action_view/template/handlers/erb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/template/handlers/erb.rb b/actionview/lib/action_view/template/handlers/erb.rb
index 88a8570706..da96347e4d 100644
--- a/actionview/lib/action_view/template/handlers/erb.rb
+++ b/actionview/lib/action_view/template/handlers/erb.rb
@@ -138,7 +138,7 @@ module ActionView
#
# <% cache notification.event do %> # => nil
def resource_cache_call_pattern
- /\A(?:<%#.*%>\n?)?<% cache\(?\s*(\w+\.?)/
+ /\A(?:<%#.*%>)*\s*<%\s*cache\(?\s*(\w+)[\s\)]/m
end
private