The following patch makes it so that Action Pack, unless otherwise instructed, will set the current layout to the controller name if it exists and otherwise 'application' if that exists.
So if you are making a request for UserController, if app/views/layouts/user.rhtml or app/views/layouts/user.rxml exists then 'user' will automatically be set as the layout for the controller without having to include a 'layout "user"' line in the controller. Likewise, if no layout exists with the name 'user' but one exists with the name 'application' it will set that as the controller's layout. If an explicit call to 'layout' exists in the controller then the one specified there will override this behaviour.