This project is archived and is in readonly mode.

#772 ✓wontfix
Michael Bumann

collection_size locals in collection partials

Reported by Michael Bumann | August 7th, 2008 @ 01:34 PM | in 2.x

This patch adds collectionsize, firstincollection and lastin_collection local assigns to partial collections.

it basicly just sets:

local_assigns[:collection_size] = collection.size
local_assigns[:first_in_collection] = index == 0
local_assigns[:last_in_collection] = index == collection.size-1

in the renderpartialcollection method.

this gives you more flexibility in designing partials that are rendered in collections.

Issues: since the local assigns are just added to partials that are renderd in collections it is not available if a single partial is rendered.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by