I'm trying to figure out how I can set dynamic classes in slim (Rails 4). This is what I'm trying...based on how I do it in erb.
li class="<%= 'current' if user.id == current_user.id %>"
This should do!
li class="#{'current' if user.id == current_user.id}"
Basically, class=anything_that_evaluates_to_string
. This works for all kinds of attributes.