Forum: Ruby on Rails Different links after refresh

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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_to 'Destroy',
url_for(:controller => :links, :action => "destroy", :id =>

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

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.

This topic is locked and can not be replied to.