instance method collection_without_template

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v3.0.20

Signature

collection_without_template(collection_paths = @collection_paths)

No documentation comment.

Parameters

collection_paths opt = @collection_paths
Source
# File actionpack/lib/action_view/render/partials.rb, line 306
      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

Defined in actionpack/lib/action_view/render/partials.rb line 306 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Partials::PartialRenderer

Type at least 2 characters to search.

↑↓ navigate · open · esc close