Flowdock
method

collection_without_template

Importance_0
v3.0.0 - Show latest stable - 0 notes - Class: ActionView::Partials::PartialRenderer
collection_without_template(collection_paths = @collection_paths) public

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/render/partials.rb, line 267
      def collection_without_template(collection_paths = @collection_paths)
        segments, locals = [], @locals
        index, template  = -1, nil

        if @options[:as]
          as = @options[:as]
          counter = "#{as}_counter"
        end

        @collection.each_with_index do |object, i|
          template = find_template(collection_paths[i])
          locals[as || template.variable_name] = object
          locals[counter || template.counter_name] = (index += 1)

          segments << template.render(@view, locals)
        end

        @template = template
        segments
      end
Register or log in to add new notes.