1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Kasper Timm Hansen 2016-02-12 20:50:26 +01:00
parent a88636fa77
commit 914e2002d8

View file

@ -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