IE7 and restful delete links broken?

My restful delete links work in everything except IE7, in which case the
delete works, but then it redirects back to the ‘href’ that was on the
delete link. I’ve even tested this with regular restful scaffold and i
still get the same behavior.

<%= link_to(image_tag(“delete.png”, :border=>0, :alt=>“Delete List”),
{:controller => ‘lists’, :action=>‘destroy’, :id=>@list},
{:confirm=>‘Are you sure you want to delete this list?’,
:method=>“delete”}) %>

Link Output:
Delete List

Destroy Method:

DELETE /lists/1

DELETE /lists/1.xml

def destroy
@list = List.find(params[:id])

respond_to do |format|
  flash[:notice] = "List <strong>#{}</strong> was

successfully deleted."
format.html { redirect_to lists_path }
format.xml { head :ok }

map.resources :lists,:member=>{:print=>:get}, :collection => {:order =>
:put} do |list|
list.resources :categories, :collection => {:order => :put} do
category.resources :items, :collection => {:order => :put}

When you click delete, it runs through destroy, destroys the list, and
then instead of redirecting to lists_path, it redirects to /lists/[id]
which is the href on the delete link. This behavior is ONLY in IE7. IE6
works fine, as do firefox and safari.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs