The REST style characterizes communication between system components (where a component is, say, a web browser or a server) as a series of requests to which the responses are representations of resources.
What you actually do get hold of is never the resource itself, but a representation of it.
A resource may, at any given point, be available in any number of representations.
A resource is something like a "business entity" in modeling lingo. It's an entity you wish to expose as part of an API. Almost always, the entity is a noun, e.g. a person, a car, or a football match.
There’s a temptation to call your actions add_item and replace_email_address and things like that. But things get simpler when you name your actions after CRUD operations, or as close to the names of those operations as you can get.
Each of routes generated by map.resources takes up memory in your application, and causes Rails to generate additional routing logic.
Luckily, since Rails 2.2 you can use the :only and :except options to fine-tune the routes that Rails will generate for resources. You can supply a single action, an array of actions, or the special :all or :none options.
A PUT or DELETE request, in the context of REST in Rails, is actually a POST request with a hidden field called _method set to either “put” or “delete”. The Rails application processing the request will pick up on this, and route the request appropriately to the update or destroy action.
Imagine, for instance, that you have a resource that could exist only one, a blog. You don’t need an index action for the blog resource, since there is only (and can only ever be) one blog in the application.
map.resource is designed for just this situation. You use it in just the same way as its plural relative.