$("#reply").find("textarea").val("").end().hide(); $("#posts").append("<%= escape_javascript(render(partial: 'post', locals: { post: @post, n: -1 })) %>");