Hi All,
I'm rendering a partial in a collection like this :
<%= render :partial => 'issues/issue', :collection => @issues %>
Inside the partial, I want to render a
element unless it's the last in the collection. I could of course, render the partial like this
<%= render :partial => 'issues/issue', :collection => @issues, :locals => {:issue_count => @issues.length } %>
then put this inside my partial
<% unless issue_counter + 1 == issue_count %>
<hr />
<% end %>
but I don't want to have to explicitly set the local in the render call, and I the collection isn't always going to be called @issues, so I can't just access the instance varibale. Is there some way to access the length of the collection automatically inside the partial to tell where in the collection the object falls? If there's not already, is it possible to add this in such a way that I'll automatically get the issue_count local? Any help on this will be much appreciated.
Thx,
-C