Tuesday, December 21, 2010

[Rails] Rails - escape_javascript without all the \n\n\n\n\n

Hello, I'm using escape_javascript to return a partial to the browser
via ajax.

Something like:

$("#inject").html("<%=escape_javascript(render :partial =>"feed/
index")%>");

Problem is escape_javascript ends up outputing all kinds of wasted
space like

\n\n\n\n\n \n

Is there anyway in Rails to escape_javascript more efficiently? No
need for \n or long gaps of spaces?

Thanks

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