Okay, I believe I understand what you are saying (I'm just probably
missing something small now)
Here's the updated...
Routes:
map.resources :rushing_offenses
map.resources :rushing_offenses, :collection => { :destroyall => :delete
}
Link:
<%= link_to "Destroy All", rushing_offenses_path, :confirm => "Are you
sure?", :method => :delete %>
Controller Method:
def destroyall
RushingOffense.destroy_all
redirect_to rushing_offenses_url
end
====================
No errors but when I click the link, I just get the redirect and all the
data is still there..
I'm sure at this point, it must be something simple..
--
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
-~----------~----~----~----~------~----~------~--~---