Hi,
Make sure that  Model.website_url contains  http:// - e.g. <%=
link_to(image_tag(model.small_image), "http://www.google.com";) %>

-Jazmin


On Wed, Mar 16, 2011 at 2:03 PM, srj <[email protected]> wrote:

> Using Rails 2.2.2, I want to display an image that when clicked, will
> take the user to an external site.  I have the following code for
> this:
>
>     <%= link_to(image_tag(model.small_image), model.website_url) %>
>
> However, when this is rendered, the URL has the path (route?) pre-
> pended to it.  So instead of  http://www.google.com, I get
> http://localhost:3000/users/12/www.google.com.
>
> What changes do I need in order to get just http://www.google.com ?
>
> Thanks for any help you can offer.
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
Jazmin

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to