Reputation: 215
In erb files I can do something like
<tr class="<%= cycle('list_line_odd', 'list_line_even') %>">
How would this line look in a slim file? Thx.
Upvotes: 2
Views: 1306
Reputation: 427
Alternatively:
tr[class=cycle('list_line_odd', 'list_line_even')]
or
tr class=cycle('list_line_odd', 'list_line_even')
Upvotes: 5