$('body').replaceWith('<%= escape_javascript(render(:partial => 'search_result2', :query => @result_query)) %>');
我想在.html.haml
JavaScript 中使用它,
$('body').replaceWith('<%= escape_javascript(render(:partial => 'search_result2', :query => @result_query)) %>');
如何更改此行
<%= escape_javascript(render(:partial => 'search_result2', :query => @result_query)) %>