Hi Markus,

I think I haven't been clear enough, the default resource is set up for
individual members, rake routes gives me this:

...
DELETE /appearances/:id(.:format)
...

Whereas I actually want to create a route for deleting a collection:

...
DELETE /appearances
...

But I don't believe this is created by default, I get a no route error
when calling delete on just the  controller without an id.

So in short - I actually want to have a route to delete a whole
collection, but the default resources method in routes.rb creates a
delete method for a member, and doesn't set up a route for deleting a
collection. I would like to know how to add a delete route for a
collection.

Thanks!

Markus Proske wrote in post #988427:
> Hi,
>
> a collection routes is meant to work on the whole collection. Example
> for a
> collection delete would be for example to delete all books that are out
> of
> print. If you want to delete a particular book the member route is
> perfect....how would you otherwise know in your controller, which book
> to
> delete?
>
> Markus
>
> --
> http://www.communityguides.eu

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

Reply via email to