Flowdock
method

render_collection

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: PartialRenderer

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

These similar methods exist in v6.1.7.7:

render_collection(view, template) private

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/partial_renderer.rb, line 323
      def render_collection(view, template)
        identifier = (template && template.identifier) || @path
        instrument(:collection, identifier: identifier, count: @collection.size) do |payload|
          return RenderedCollection.empty(@lookup_context.formats.first) if @collection.blank?

          spacer = if @options.key?(:spacer_template)
            spacer_template = find_template(@options[:spacer_template], @locals.keys)
            build_rendered_template(spacer_template.render(view, @locals), spacer_template)
          else
            RenderedTemplate::EMPTY_SPACER
          end

          collection_body = if template
            cache_collection_render(payload, view, template) do
              collection_with_template(view, template)
            end
          else
            collection_without_template(view)
          end
          build_rendered_collection(collection_body, spacer)
        end
      end
Register or log in to add new notes.