Forum: Ruby on Rails Different links after refresh

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cisco R. (Guest)
on 2009-04-28 03:07
I have a couple of links that appear via Ajax.

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

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!
This topic is locked and can not be replied to.