Just wondering if and how I can access the referer from the controller. Thanks in advance -- Posted via http://www.ruby-forum.com/.
Chris Korhonen
2006-Mar-24 09:12 UTC
[Rails] Newbie Question: How can I access the referer
Give this a try: $HTTP["referer"] That should work,,, Chris On 3/24/06, Alexander <maccman@gmail.com> wrote:> Just wondering if and how I can access the referer from the controller. > Thanks in advance > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
or in your controller you could use request_uri -- may need to use @request.request_uri and a whold lot of others http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html#M000153 On 3/24/06, Chris Korhonen <ckorhonen@gmail.com> wrote:> > Give this a try: > > $HTTP["referer"] > > That should work,,, > > Chris > > On 3/24/06, Alexander <maccman@gmail.com> wrote: > > Just wondering if and how I can access the referer from the controller. > > Thanks in advance > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060324/9bdc0b46/attachment.html
How would I redirect to the referer? -- Posted via http://www.ruby-forum.com/.