Reputation: 2320
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.)
Upvotes: 0
Views: 109
Reputation: 3123
One way is to wrap your javascript in string, then just eval it after load.
Upvotes: 1