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

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

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -