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?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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> > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---