Global back link

One thing I’ve encountered a lot within application development is the
need for a global “back link”. Yes, I know you can use javascript,
but I am looking for a more elegant approach… accomplished using
the rails framework. The scenario is… I can arrive at the same page
from various origins within my application. But I would like to be
able to easily redirect the user back the exact page they came
from … or if an “edit/update” occurred, I could perform the save
and return the user back appropriately. Has anyone seen/implemented
such a solution before??

On 25 Mar 2008, at 17:05, veyron wrote:

One thing I’ve encountered a lot within application development is the
need for a global “back link”. Yes, I know you can use javascript,
but I am looking for a more elegant approach… accomplished using
the rails framework. The scenario is… I can arrive at the same page
from various origins within my application. But I would like to be
able to easily redirect the user back the exact page they came
from … or if an “edit/update” occurred, I could perform the save
and return the user back appropriately. Has anyone seen/implemented
such a solution before??

Well there’s redirect_to :back (but if the referrer isn’t set that
won’t work)

Fred

Thanks, Fred. That will work for 90% of what I need. The other 10%
comes from the need to know where the “new/edit” requests came from
(list page, etc).

On Mar 25, 1:28 pm, Frederick C. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs