I want to have a "Delete"-link on a page viewing an object in my Ruby on Rails project. I am running into problems as
<%= link_to "Delete", @member, :confirm => 'Are you sure?', :method => :delete %>
loads the page it is on, when the method has run, thus trying to load a non-existent object. I would like to return to an index page, once the object is deleted.
Any ideas?