Arturas.Baranauskas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2009-Sep-28 12:30 UTC
Links to external content
Hello everybody. I have a tricky situation with external links in my Rails application. I have online shopping catalog. All goods have "vendor information" field where URL to vendor''s information about particular shopping item could be found. The problem is that I''m not unable to create external links in shopping item views - Rails adds host and controller to the vendor''s URL, like this "http://www.myshoppingcatalog.com/ shopping_items/www.vendor.com". I tried link_to and url_for almost all variations but it didn''t work. How can I get "pure" vendor''s URL ? Thank you for your help in advance. Best regards, ArtūrasB.
Arturas.Baranauskas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Hello everybody. > > I have a tricky situation with external links in my Rails application. > I have online shopping catalog. All goods have "vendor information" > field where URL to vendor''s information about particular shopping item > could be found. The problem is that I''m not unable to create external > links in shopping item views - Rails adds host and controller to the > vendor''s URL, like this "http://www.myshoppingcatalog.com/ > shopping_items/www.vendor.com". I tried link_to and url_for almost all > variations but it didn''t work. How can I get "pure" vendor''s URL ?Use a full URL -- in other words, start with "http://". If you do that, link_to should figure out what you want.> > Thank you for your help in advance. > > Best regards, > ArtūrasB.Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Arturas.Baranauskas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2009-Sep-29 08:02 UTC
Re: Links to external content
Hi Marnen . Thank you for the idea. I''ll try it at home. Regards, Artūras B. On 28 Rugs, 16:13, Marnen Laibow-Koser <rails-mailing-l...@andreas- s.net> wrote:> Arturas.Baranaus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > Hello everybody. > > > I have a tricky situation withexternallinksin my Rails application. > > I have online shopping catalog. All goods have "vendor information" > > field where URL to vendor''s information about particular shopping item > > could be found. The problem is that I''m not unable to createexternal > >linksin shopping item views - Rails adds host and controller to the > > vendor''s URL, like this "http://www.myshoppingcatalog.com/ > > shopping_items/www.vendor.com". I tried link_to and url_for almost all > > variations but it didn''t work. How can I get "pure" vendor''s URL ? > > Use a full URL -- in other words, start with "http://". If you do that, > link_to should figure out what you want. > > > > > Thank you for your help in advance. > > > Best regards, > > ArtūrasB. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://www.ruby-forum.com/.