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:
parent
a88636fa77
commit
914e2002d8
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue