diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-12 20:50:26 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-02-12 20:50:26 +0100 |
commit | 914e2002d8bf86d1c7047f4f6280dcf7b0c8bd19 (patch) | |
tree | 8b4537bd932a28112251fe7276f6587658440ee1 /actionview/lib/action_view/renderer | |
parent | a88636fa779935af5ec683fbe4b69b3229e116e7 (diff) | |
download | rails-914e2002d8bf86d1c7047f4f6280dcf7b0c8bd19.tar.gz rails-914e2002d8bf86d1c7047f4f6280dcf7b0c8bd19.tar.bz2 rails-914e2002d8bf86d1c7047f4f6280dcf7b0c8bd19.zip |
Remove single_template_render? method.
Written when I didn't understand the internals as well. Action View
generally just refers to `@template` when meaning a fixed template
render. So follow that implicit convention.
Diffstat (limited to 'actionview/lib/action_view/renderer')
-rw-r--r-- | actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb index 19d9fdf1d4..5a294744e8 100644 --- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb @@ -30,14 +30,10 @@ module ActionView end def automatic_cache_eligible? - single_template_render? && !callable_cache_key? && + @template && !callable_cache_key? && @template.eligible_for_collection_caching?(as: @options[:as]) end - def single_template_render? - @template # Template is only set when a collection renders one template. - end - def callable_cache_key? @options[:cache].respond_to?(:call) end |