Sunday, April 17, 2011

[Rails] Re: why <% concat(csrf_meta_tag) #aa%> is invalid while <% javascript_include_tag :defaults #abc%> is valid?

On Apr 17, 7:43 pm, hanzhao <cx.cheng...@gmail.com> wrote:
> as the subject said.

I assume you mean <%= in the second case. The way that erb generates
ruby code from a template means that comments aren't supported - the
comment inside the <% tag ends up commenting other bits of the code
generated by erb.
The only form of comments that are safe is <%#

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate