class ActionView::CollectionRenderer
def render_collection_with_partial(collection, partial, context, block)
def render_collection_with_partial(collection, partial, context, block) iter_vars = retrieve_variable(partial) collection = if collection.respond_to?(:preload_associations) PreloadCollectionIterator.new(collection, partial, iter_vars, collection) else SameCollectionIterator.new(collection, partial, iter_vars) end template = find_template(partial, @locals.keys + iter_vars) layout = if !block && (layout = @options[:layout]) find_template(layout.to_s, @locals.keys + iter_vars) end render_collection(collection, context, partial, template, layout, block) end