Just one entry in routes.rb for rushing_offenses
map.resources :rushing_offenses, :collection => {:destroyall => :delete}
(the :collection or :member are additions to the standard resource
mappings, you don't need to specify a second line)
and tweak the link definition
<%= link_to "Destroy All", destroyall_rushing_offenses_path, :confirm =>
"Are you
sure?", :method => :delete %>
That should do it... For fun, run a
rake routes >routes.lst
to get a file where you can view what all your routes look like.
--
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
-~----------~----~----~----~------~----~------~--~---