diff options
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb | 2 |
1 files changed, 1 insertions, 1 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 e6d57b802e..4860f00243 100644 --- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb @@ -18,7 +18,7 @@ module ActionView cached_partials = collection_cache.read_multi(*keyed_collection.keys) @collection = keyed_collection.reject { |key, _| cached_partials.key?(key) }.values - rendered_partials = @collection.any? ? yield : [] + rendered_partials = @collection.empty? ? [] : yield index = 0 keyed_collection.map do |cache_key, _| |