On Tue, Jun 9, 2009 at 7:52 AM, Älphä
Blüë<[email protected]> wrote:
>
> Gianluca Tessarolo wrote:
>> Try this:
>
> I tried both suggestions and received similar results.  I get the
> following errors:
>
> ActiveRecord::RecordNotFound in Rushing offensesController#show
>
> Couldn't find RushingOffense with ID=destroyall
>
> Request
> Parameters:
>
> {"confirm"=>"Are you sure?",
>  "method"=>"delete",
>  "id"=>"destroyall"}
>
> Response
> Headers:
>
> {"Cache-Control"=>"no-cache",
>  "Content-Type"=>""}
>
>
> The only changes I made to the code above was for route I needed to do:
>
> map.resources :rushing_offenses, :collection => { :destroyall => :delete
> }
>

I think you want

  map.resources :rushing_offenses, :collection => {:delete => :destroyall}
-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to