Forum: Ruby on Rails session_timeout and link_to_remote conflict

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2007-05-02 14:08
(Received via mailing list)
Hi,

I have a membership rails application and I used session_timeout
plugin to allow accounts
to automatically logout after a period of time (15 minutes)

In some screen I have a div container which is updated with
link_to_remote function.

If the application is idle 15 minutes, and I'll try to press the
link_to_remote, the login page it will be loaded in the div, not as
parent page.

How can I resolve this ?

Thanks
Kenneth D. (Guest)
on 2007-05-02 17:24
(Received via mailing list)
Quoth removed_email_address@domain.invalid 
(removed_email_address@domain.invalid):
> If the application is idle 15 minutes, and I'll try to press the
> link_to_remote, the login page it will be loaded in the div, not as
> parent page.
>
> How can I resolve this ?
>

I had a similar problem.  I resolved it in the authentication code
which renders the login page:

   if request.xhr?
      # redirect to auth page
   else
      # render auth template
   end

Ken

--

I use the words you taught me. If they don't mean anything any more,
teach me others. Or let me be silent.
                        Samuel Beckett (Clov, Endgame)
This topic is locked and can not be replied to.