Hi Ernie, >> Don't forget the 422 Unprocessable Entity status code. > > Where is that documented? I didn't see it on: > > http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
It was added by the WebDAV project. Here's the ticket in Trac that made ActiveResource start to treat a 422 as an invalid resource: http://dev.rubyonrails.org/ticket/7097 If you follow the discussion linked to from this ticket you'll see a post from Roy Fielding, where he suggests 422 as sufficient for the purposes of reporting that the request body was syntactically valid, but semantically invalid -- that the server is unable to process it. Prior to Roy's post people were talking about creating a 418 Invalid status code, until he pointed out the previously defined 422. >> How about mentioning conventions for searching using query strings >> that I've seen in ActiveResource? Any extra params you send through >> to the find() method are added to the query string. Here's an >> article >> exploring different conventions for search: > > http://woss.name/2007/07/22/convention-for-restful-search-in- > rails/ > > That's a great suggestion, but right know there doesn't seem to be > any "standard" for how to do it. Many if resource_search gets > standardized (and integrated into Rails) then we can make *that* the > convention... It sort of is a convention right now in ActiveResource, although not all Rails apps make use of it. In the docs [1] for ActiveResource#find it shows the following example: Person.find(:all, :params => { :title => "CEO" }) # => GET /people.xml?title=CEO I admit we're a long way away from real standardization on the server side though.. [1] http://edgedocs.planetargon.org/classes/ActiveResource/ Base.html#M001761 -- Thanks, Dan __________________________________________________________________ Dan Kubb Autopilot Marketing Inc. Email: [EMAIL PROTECTED] Phone: 1 (604) 820-0212 Web: http://autopilotmarketing.com/ __________________________________________________________________ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core?hl=en -~----------~----~----~----~------~----~------~--~---
