I'm using jQuery with rails and have the following piece of code
$('#related').html("<%= render :partial => "related_items" %>");
I'm having a problem in the browser where the content of the #related element is only being replaced when there are no line breaks in the partial.
This isn't too much of a big deal, I can place everything on one one line but it makes the code very difficult to read.
Is there a way around having to omit line breaks in the jQuery html() attribute?