Hey,
I have a ajax method that renderes a @collection of users. This code is from the users partial. Now what I need to do is wrap a ul tag around the 3 li tags for every third object. How do I do this with HAML? I can't just add the %ul tag to "when 1" - because HAML closes the tag when that object has been rendered.
-case user_counter + 1
-when 1
%li.first
@user.login
-when 2
%li
@uer.login
-when 3
%li.last
@user.login
This is the result I am looking for:
<ul>
<li>user1</li>
<li>user2</li>
<li>user3</li>
</ul>
<ul>
<li>user4</li>
<li>user5</li>
<li>user6</li>
</ul>
etc.