Problem with 'periodically_call_remote'


#1

My ajax-application have folowing behaviour: Just 1 page loaded
with 1st request and all other content always loaded into special DIV
using ajax when user clicked menuitems.

On some “pages” I using ‘periodically_call_remote’, but I can’t STOP
it!

Simple example:

View:

<%= link_to_remote 'Stop tracking', :url => { :action => 'stop' } %> <%= periodically_call_remote :url => { :action => 'track_all' }, :update => 'tracking' %>

Controller:

def track_something

DATABASE ACCESS HERE


render :partial => ‘track’
end

def stop
render :update do |page|
page.remove ‘view’
end
end

When ‘stop’ action executed, database access still work… It’s strange
isn’t it?

PS: It’s stoped after refreshing the page, but my application renders
all content using ajax requests and I can’t refresh - displayed data
will be lost.