Answer the question
In order to leave comments, you need to log in
How to write this code in haml?
I will give an example of how I would write in erb
<div class="point <%if params[:id]==point.id%>active_point<%end%>">
</div>
Answer the question
In order to leave comments, you need to log in
- klass = 'active_point' if params[:id] == point.id
%div{:class => "code #{klass}"}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question