0

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">    &lt;form accept-charset=UTF-8 action=/utilizator class=new_utilizator data-remote=true id=new_utilizator method=post&gt;&lt;div style=margin:0;padding:0;display:inline&gt;&lt;input name=utf8 type=hidden value=&amp;#x2713; /&gt;&lt;input name=authenticity_token type=hidden value=5tHgeGujhAMWGCQ9ioRK6Ra/hJgyFsBAm8uedCVZKP0= /&gt;div&gt;            &lt;ul&gt;                  &lt;li&gt;Email nu poate fi golli&gt;            ul&gt;        &lt;span&gt;          &lt;div class=field_with_errors&gt;&lt;input id=utilizator_email name=utilizator[email] placeholder=Scrieţi emailul dacă eşti interesant/ă size=30 type=email value= /&gt;div&gt;          &lt;input class=button id=utilizator_submit name=commit type=submit value=Anunţă-mă /&gt;        span&gt;form&gt;</div>

What am I doing wrong here ?

Thanks,

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

thanks man, I was going crazy searching the web for a solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.