aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-02-12 22:04:09 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2016-02-12 22:04:09 +0100
commit61b03f37d8117c71ede59b335e493fd8016c414a (patch)
treeaacae3ed3134ebba0b044fc7c2ff81d8d82cfa98 /actionview
parent48349f28b0b81c5d646ff9670a255f1740d98282 (diff)
downloadrails-61b03f37d8117c71ede59b335e493fd8016c414a.tar.gz
rails-61b03f37d8117c71ede59b335e493fd8016c414a.tar.bz2
rails-61b03f37d8117c71ede59b335e493fd8016c414a.zip
Remove useless callable_cache_key? check.
`automatic_cache_eligible?ยด is only called if there was no `:cache` key to fetch in the `@options` via `cache_collection?`. So the check will always be false.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb3
1 files changed, 1 insertions, 2 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 5a294744e8..4bc4147e1b 100644
--- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb
+++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb
@@ -30,8 +30,7 @@ module ActionView
end
def automatic_cache_eligible?
- @template && !callable_cache_key? &&
- @template.eligible_for_collection_caching?(as: @options[:as])
+ @template && @template.eligible_for_collection_caching?(as: @options[:as])
end
def callable_cache_key?