This should be an easy question for anyone who has served a rails partial via jquery.
This line of code:
$('div#status-chg-form').html('<%= escape_javascript(render(:partial => statusform)) %>').dialog('open');
is part of a script to serve a partial in a modal dialog. When the dialog pops up I get only a literal string inside that reads:
<%= escape_javascript(render(:partial => statusform, :remote => true)) %>
This is rails 3.1.
(edited to add:)
$(rails_partial = "<%= escape_javascript(render(:partial => statusform)) %>");
$('div#status-chg-form').append(rails_partial).dialog('open');
I have also tried the above to pass the html as a string, thinking there was some problem with the way jquery was processing this. Still doesn’t work.
It looks as if your code is not being processed as erb prior to be sent out to the client.
I’d recommend reviewing this Railscast:
“Railscast 136 – JQuery”
It will walk you through exactly how to do what you’re having an issue with.