I am using jQuery with rails and have the following code snippet
$('#related').html("<%= render :partial => "related_items" %>");
I have a problem in the browser where the contents of the linked element are replaced only when there are no line breaks in the partial.
This is not too much, I can put everything on one line, but it makes the code very difficult to read.
Is there a way to get around line breaks in the jQuery html () attribute?
source
share