method
collection_without_template
rails latest stable - Class:
ActionView::Partials::PartialRenderer
collection_without_template(collection_paths = @collection_paths)public
No documentation available.
# 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