I've rewritten my html code with rails content_tag
s and now I want to add if-statements to them.
Before I had:
<% if ... %>
<div class='...'>
...
</div>
<% end %>
Now I have 2 types of this block:
<%= content_tag(:div, ..., class: 'some_class') if ... %>
This works ok. But when I try to add if-statement to do-end
block it fails:
<%= content_tag(:div, class: 'some_class') if ... do %>
...
<% end %>
I'm seeing this, instead of div
content:
<div>{:class=>"some_class"}</div>
Thanks!