Forum: Ruby on Rails Back In Time

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.
Aa575b7606897a056f073f0f148804dd?d=identicon&s=25 Gareth Reeves (Guest)
on 2006-04-12 16:45
On a system that I am working on, there are 2 places where you can edit
answers to questions. After editing, I need to redirect back to the
place where the user came from. A common problem I am sure, but I
couldn't find any info on how other people had handled it.

I came up with a method called 'redirect_back_in_time' that redirects
you to a point in history.

I know the edit takes 2 pages to complete so to get back to where the
user started I know I need to redirect_back_in_time 3.

I wrote this up on my blog http://counterflo.ws and put the code up
there.

How does this solution compare to what you guys have done? Is this
better or worse?

Thanks

Gareth
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-04-12 17:09
(Received via mailing list)
Gareth Reeves wrote:
>
> I wrote this up on my blog http://counterflo.ws and put the code up
> there.
>
> How does this solution compare to what you guys have done? Is this
> better or worse?
I use the params hash rather than the request_uri, but it's much the
same idea...
This topic is locked and can not be replied to.