In our project, we had to assign a variable name to
periodically_call_remote, so that we could manipulate it using
rjs/javascript (for instance, calling stop()). I changed the
periodically_call_remote to include a :name parameter, to generate
this:
var updater = new PeriodicalExecuter(function() {new
Ajax.Updater('news_block', 'update', {asynchronous:true,
evalScripts:true})}, 20)
instead of simply
new PeriodicalExecuter(function() {new
Ajax.Updater('news_block', 'update', {asynchronous:true,
evalScripts:true})}, 20)
(the name is configurable, of course)
Hope it's useful for anyone else..