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? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -