rails/rails — pull request #5634 by dv (2012-03-28 12:29:51+00:00)
Title: Add _is_first and _is_last to partial rendered by collection

Much like the _counter variable that is accessible from within a partial called by a collection, the _is_first and _is_last designate if the current call to the partial is for the first or the last item respectively inside the collection.

Useful if in the view, structural changes need to be made to the partial HTML in case of the first or last item of a collection.