This project is archived and is in readonly mode.
ActiveResource with map.resource
I am using ActiveResource to access RESTful api. One of the resource exposed by API is a singleton resource (In routes it is mapped using maps.resource instead of maps.resources).
Say 'Booga' is the singleton resource exposed by REST following is the list of problems I am facing right now
1. REST has to expose pluralize API (boogas) for singleton resource because ActiveResource would generate all requests for collection name.
2. Invoking find(:first) on ActiveResource results in error as it expects an array in response where as REST returns a single entity. (show/get doesn't work)
3. Booga.new(:id => 1, :name => ......).save would invoke a PUT request on URL .../boogas/1, where as the PUT URL exposed by REST is .../boogas; hence it results in error 'No matching routes found' (update/put doesn't work)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>