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.

[email protected] 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
[email protected]

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-