syntax - What is the difference between "-%>" and "%>" in Rails 3? -


this question has answer here:

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

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -