Thanks Jeremy! So it has no effect in html.erb files, i.e., in the
views, right? I tested here and nothing changed.
Here is a page that maybe can help someone: http://springyweb.com/documents/1
On Jun 14, 8:40 pm, Jeremy Kemper
<jer...-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org>
wrote:> On Sun, Jun 14, 2009 at 3:54 PM,
tivrfoa<lescoutinh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > hello
>
> > what this "-" for?
>
> > thanks!
>
> -%> strips the trailing whitespace and newline.
>
> <%- strips leading whitespace but not newline.
>
> So
> <% if foo %>
> bar
> <% end %>
> generates " \n bar\n \n" whereas
> <%- if foo -%>
> bar
> <%- end -%>
> generates " bar\n"
>
> This is especially useful in templates for plain-text emails.
>
> jeremy