How to convert this ERB code:
<div <%= 'class="highlight"' if job.done %>>
into Haml code?
%div{:class => ('hightlight' if job.done)}
I believe would also do the trick, and doesn't create class= '' if job.done == false, also looks more like your initial code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With