Instead of using erb, I am using haml. So my code looks something like this:
$("<%= escape_javascript(render @user) %>").appendTo("#users");
Unfortunately, the code mentioned in is not working for me.
Any suggestions or ideas on how to make it work?