Ruby on Rails Monday, November 1, 2010

After doing a search of @homepages using ajax I want to update my div
with:-
$("testsearch").update("<%= escape_javascript(render(@homepages)%>");
in my index.js.erb

Which does not work as I am getting an internal server error:-
Error during failsafe response: incompatible encoding regexp match
(UTF-8 regexp with ASCII-8BIT string)

Anyone has any ideas why I am getting this error.

As a test the following renders OK.
$("testsearch").update("<%= escape_javascript(render :text =>'this is
UJS')%>");

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment