Different links after refresh

I have a couple of links that appear via Ajax.

<%= link_to 'Edit', url_for(:controller => :links, :action => "edit", :id => link.id) %> | <%= link_to 'Destroy', url_for(:controller => :links, :action => "destroy", :id => link.id) %>

After their appearance, they go to
http://localhost:3000/users/1/links/110/edit and
http://localhost:3000/users/1/links/110.

If I refresh the page, they go to http://localhost:3000/links/edit/110
and http://localhost:3000/links/destroy/110.

Can somebody let me know what causes this, and if there is a better way
to create these links than to use url_for.

Thanks!