RJS Templates Don't Automatically Eval

Following the directions for using RJS has nearly worked for me -
actually I’m using it successfully but not the way its documented and
others have reported it working. The javascript code is generated
properly but its not evaluted.

I followed instructions found at:

http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates

and

http://rails.techno-weenie.net/tip/2005/11/29/ajaxed_forms_with_rjs_templates

My template is very simple right now, I just include the partial that
I would have been updating from before:

page.replace_html ‘list_items_div’, :partial => ‘items’

Which all works fine, if I put add a :complete to my form_remote_tag
it will work just as advertised, but I’m concerned something is wrong
if I have to do this, and if its fixed later I’d get the eval
happening twice which could be a problem for some code …

I’m running edge rails and I’ve ensured prototype.js is updated.

Any other ideas?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs