Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveResource with map.resource

#760

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)

Reported by Niranjan Paranjape · August 5th, 2008 @ 08:44 AM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to wontfix

    November 22nd, 2008 @ 07:49 PM