syntax - What is the difference between "-%>" and "%>" in Rails 3? -
this question has answer here:
- '-%>' (minus sign) @ end of erb sequence 2 answers
what difference between :
<% @posts.each |p| -%> <%= p.title %> <% end -%>
and
<% @posts.each |p| %> <%= p.title %> <% end %>
and there ?
-%>
means not insert '\n' , whitespaces after command.
Comments
Post a Comment