views:

124

answers:

2

<%= link_to 'Show', buddy, :only_path => false %>

Doesn't seem to work. I need the full path: http://www.my-server.com/buddy

How do I do this?

+4  A: 

If you've defined buddy as a resource in your routes.rb:

map.resources :buddy

then you should be able to do the following:

<%= link_to 'Show', buddy_url(buddy) %>
Mike
Yup - that did it. Thanks!
neezer
A: 

Use buddy_url.

maurycy