Ruby on Rails Monday, December 27, 2010

On Dec 27, 10:40 pm, dubstep <solut...@gmail.com> wrote:
> I am trying to put a hyperlink in my view and it is not being rendered
> properly.
>
> In my view, I have:
>
> <%= link_to 'Search', 'google.com' %>
>

You're missing the protocol (http://)

Fred


> the HTML source when rendered is:
> <a href="google.com">Search</a>
>
> However, on the browser, it displays:
>
> Search(google.com)
>
> If I try and use a standard 'a href=', it does the same thing.
>
> Has anyone experienced this before?
>
> Thanks.

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

No comments:

Post a Comment