I would have thought your example was a perfectly RESTful thing to do, probably in your messages controller.
Providing your user authentication complies with HTTP standards, then scoping your queries isn’t necessarily un-RESTful.
James.
I would have thought your example was a perfectly RESTful thing to do, probably in your messages controller.
Providing your user authentication complies with HTTP standards, then scoping your queries isn’t necessarily un-RESTful.
James.
For the authentication, yes.
I see that a RESTful authentication plugin was just released (haven’t had a chance to try it yet):
http://www.agilewebdevelopment.com/plugins/restful_authentication
James.
That depends whether you'd consider the different status messages as distinctly different resources, or whether those methods are simply different conditions.
If they're different kinds of resources, you should probably use separate controllers for each. If it's options for what to display, you could consider using a query string:
/messages/?status=sent
or you _could_ add extra methods, so long as they map to methods
map.resources :messages, :collection => { :sent => :get, :received => :get, :deleted => :get }
which I believe would give you:
/messages/;sent /messages/;received /messages/;deleted
James.