Tuesday, April 29, 2008

Ruby on Rails: Difference between <% %> and <% -%>

<% -%> supress the trailing new line. You can also use <%- %> to supress leading whitespace. You need to use <%= %> when you need to output something.

No comments:

Post a Comment