Flowdock
method

render_partial_collection

Importance_0
Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: ActionView::Partials

Method deprecated or moved

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

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 207
      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
          local_assigns["#{as.to_s}_counter".to_sym] = local_assigns[template.counter_name] if as
          result = template.render_partial(self, object, local_assigns.dup, as)
          index += 1
          result
        end.join(spacer).html_safe
      end
Register or log in to add new notes.