Render partial with collection has hidden counter
Now, when rendering
<ul>
<%= render :partial => 'item', :collection => @items %>
</ul>
I can have the partial where only 3 items are shown:
<li style="<%= (item_counter + 1 > 3) ? 'display:none' : '')">item.name</li>
No comments:
Post a Comment