I think your understanding of REST is pretty good. It doesn't need to be any more complicated than it should be. Also @Surya outlines some very good points.
The way Rails maps the HTTP methods to controller methods is:
GET => show
PUT => update
POST => create
DELETE => destroy
Two other resources/methods that rails provides namely:
resource/new => new
resource/edit => edit
are most likely not resources for all practical purposes but are needed for building web pages and applications. If the client had full knowledge of the resource, these would not be needed. A client can just make POST
and PUT
calls with the resource information and create or update resources as needed. But since users are not expected to know the ins and outs of a resource, they need an easier interface to work with for creation or updation.
If all users were fully aware of the resources and were skillful enough with the command line, we wouldn't even need HTML. They can just curl
in their interactions with those resources :)
index
just makes it easier to work with collections. It is still a well defined resource and has a unique representation, for example /books
. How it is handled on the server side code does not make it RESTless
(I just made that up, but its awesome).