views:

45

answers:

1

Hi!

I am updating a page through AJAX using .rjs template. Is there any way to block evaluating javascript in rendered content (something like :script => false for link_to_remote)?

My update.rjs looks pretty much like this:

page.replace_html 'some_div', :partial => 'partial_with_js', :collection => @list
page.insert_html ...
(etc.)
+1  A: 

One way is to wrap your javascript in string, then just eval it after load.

Eugene Ramirez