javascript - Why does inserting <div><%= render 'my_partial' %></div> w/ Coffeescript throw an error when the partial contains rails helper methods (e.g. link_to)? -
I have noticed that if I & lt; Div & gt; Insert
with coffeescript like this:
$ ('# container-1'). SlideUp 'Slow', - & gt; $ ('# Container-2'). Html (" > or collection_select
, Coffeescript throws a syntax error if I delete link_to
and it is a normal and lt ; A href = ...
tag, I get an error. What is happening with any idea?
As Felix suggests above, you're probably producing some coffee coffee scripts Because your coffee script is being inserted with irreversible quotation marks.
Try using a helpful method, or its easy alias j
:
& lt; / div & gt; "$ $ (' # container- 2'). Slidedown ()
Comments
Post a Comment