I have this piece of code in my .js.erb file:
$("#register_holder").html("<%= escape_javascript(render("layouts/register")) %>");
I will expect this to put the html in the register_holder div but instead it goes and puts this:
<div id="register_holder"> <form accept-charset=UTF-8 action=/utilizator class=new_utilizator data-remo开发者_JS百科te=true id=new_utilizator method=post><div style=margin:0;padding:0;display:inline><input name=utf8 type=hidden value=&#x2713; /><input name=authenticity_token type=hidden value=5tHgeGujhAMWGCQ9ioRK6Ra/hJgyFsBAm8uedCVZKP0= />div> <ul> <li>Email nu poate fi golli> ul> <span> <div class=field_with_errors><input id=utilizator_email name=utilizator[email] placeholder=Scrieţi emailul dacă eşti interesant/ă size=30 type=email value= />div> <input class=button id=utilizator_submit name=commit type=submit value=Anunţă-mă /> span>form></div>
What am I doing wrong here ?
Thanks,
I had this problem with rails 3.1.0.rc2. I believe it was impacting rails 3.0.x rcs also. Try upgrading your version of rails. Here's some more information on the problem: https://github.com/rails/rails/issues/1553
精彩评论