method

render_collection_with_partial

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: CollectionRenderer
render_collection_with_partial(collection, partial, context, block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/renderer/collection_renderer.rb, line 112
    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
Register or log in to add new notes.