Forum: Ruby on Rails Problem trying to restore last visited page

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.
Fdb488647484e40f785dde7134afc6d1?d=identicon&s=25 Heinz Strunk (cojones)
on 2009-04-19 23:08
Hello,

I have a website that works with remote procedure only. There's a
welcome action that actually renders the website and whenever you click
somewhere it only works with "render :update...". Now I would like to
automatically restore the session. For example you enter the site and
it's rendered by the action 'welcome', I click on 'show users' and the
users are being displayed using "render :update". At the same time the
currently viewed page is being saved in the session.
Now when a user returns I want to show 'show users' directly when
entering the website and not the 'welcome' page. Unfortunately I cannot
use "render :update..." in the beginning already cause there's nothing
to replace.

The problem is that all actions but 'welcome' can only be accessed using
xhr so I can't redirect_to or something like that.

I hope I could somehow make clear what my problem is and would be really
appreciate any help :)
Fdb488647484e40f785dde7134afc6d1?d=identicon&s=25 Heinz Strunk (cojones)
on 2009-04-21 11:27
Was it described too complicated?
Fdb488647484e40f785dde7134afc6d1?d=identicon&s=25 Heinz Strunk (cojones)
on 2009-04-21 21:14
Is it maybe possible to automatically reload the website with the proper
content once it's loaded and it detected a session?

I couldn't find any way how to display the website with render :update
only (page.html or something).
Fdb488647484e40f785dde7134afc6d1?d=identicon&s=25 Heinz Strunk (cojones)
on 2009-04-22 11:38
Would it be possible to do a AJAX call onLoad for body? Can't really
find anything for that but I think I read something about it
somewhere...
Fdb488647484e40f785dde7134afc6d1?d=identicon&s=25 Heinz Strunk (cojones)
on 2009-04-23 14:09
Am I that bad in describing my problem or is it just cause nobody
knows?!
This topic is locked and can not be replied to.