This seems obvious, but I wasn’t able to find info on it easily. If
you are rendering a partial from a collection:
<%= render :partial => ‘message’, :collection => @messages %>
Is there a way inside the partial to tell what item in the collection
you are on? For example, if I am in the first element in the
collection, I want to do something different?