Okay, going to simplify this a bit..
Currently, I commented out the maps because with them in they don't seem
to be working (whether I use one or the other)
# map.resources :rushing_offenses, :collection => { :destroyall =>
:delete }
# map.resources :rushing_offenses, :collection => {:delete =>
:destroyall}
My link is set to:
<%= link_to "Destroy All", rushing_offenses_path(:method =>
:destroyall), :confirm => "Are you sure?" %>
My controller has:
def destroyall
@rushing_offense = RushingOffense.delete_all
respond_to do |format|
format.html { redirect_to(rushing_offenses_url) }
format.xml { head :ok }
end
end
If I click on the link the URL shows:
http://localhost:3000/rushing_offenses?method=destroyall
but does nothing.. just shows the page with all the data...
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---