<%= -%>
<%= %>
I am confused about this. Anyone can tell me details? Thank you in advance.
<%= -%>
<%= %>
I am confused about this. Anyone can tell me details? Thank you in advance.
<%= %> prints something into ERB template
<%= -%> prints something into ERB template and avoids line break after expression.
Take a look here for details Why many people use "-%>" instead of "%>" in Rails?