I am going thru the Simply Rails 2 as a way to catch up on RoR 2.0 changes. In Chapter 8 (Protective Measures) we create a new controller on page p 259 called


Later on p. 260 we add a route to the routes.rb file as:

map.resource :session

I expected it to be:

map.resource :sessions

to match the controller name. Is there some "rails magic" that ties the singular "session" in the map.resource to the plural in the Controller? The book does not cover this but the URL does work - just curious why this works.