diff options
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 |