module ActionView::CollectionCaching
def collection_by_cache_keys(view, template, collection)
def collection_by_cache_keys(view, template, collection) seed = callable_cache_key? ? @options[:cached] : ->(i) { i } digest_path = view.digest_path_from_template(template) collection.each_with_object([{}, []]) do |item, (hash, ordered_keys)| key = expanded_cache_key(seed.call(item), view, template, digest_path) ordered_keys << key hash[key] = item end end