Flowdock
method

render_partial_collection

Importance_0
v2.2.1 - Show latest stable - 0 notes - Class: ActionView::Partials
render_partial_collection(options = {}) private

No documentation

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

Hide source
# File actionpack/lib/action_view/partials.rb, line 170
      def render_partial_collection(options = {}) #:nodoc:
        return nil if options[:collection].blank?

        partial = options[:partial]
        spacer = options[:spacer_template] ? render(:partial => options[:spacer_template]) : ''
        local_assigns = options[:locals] ? options[:locals].clone : {}
        as = options[:as]

        index = 0
        options[:collection].map do |object|
          _partial_path ||= partial ||
            ActionController::RecordIdentifier.partial_path(object, controller.class.controller_path)
          template = _pick_partial_template(_partial_path)
          local_assigns[template.counter_name] = index
          result = template.render_partial(self, object, local_assigns.dup, as)
          index += 1
          result
        end.join(spacer)
      end
Register or log in to add new notes.