Here is my code
$(function(){
$('#new_post').bind('ajax:success', function() {
$('.posts').append("<%=escape_javascript(render :partial=>'post', :loca\
ls=>{:post=>Post.new})%>");
});
});
which results in a bizarre output, the page simply append <%=escape_javascript(render :partial=>'post', :locals=>{:post=>Post.new})%>
to my list.
Does anyone know how this could happen? Thanks!