From: Eleanor McHugh Date: 2008-06-19T23:59:37+09:00 Subject: Re: Magic 'show' action On 19 Jun 2008, at 14:49, Alex Birkett wrote: > I've fixed the problem by commenting out this line in routes.rb: > map.resources :users > > I still don't understand where the action named 'show' comes from > though. I'm not a Rails expert so I'm sure someone will step in and correct the following ;p When you use map.resource Rails creates a set of RESTful routes for the resource in question, so when you hit the URL /users/login/ it's treating login as the parameter to pass to the show method of the UsersController controller as opposed to looking for the Users::LoginController that you intend. A simple solution would be to define a named route for /users/login/ prior to map.resource :users as the named route would take precedence, however if you're looking to make your application RESTful a better choice of URL scheme might be /session/[create|show|list|etc.] and treat the session itself as a RESTful entity. Hopefully that's intelligible :) Ellie Eleanor McHugh Games With Brains http://slides.games-with-brains.net ---- raise ArgumentError unless @reality.responds_to? :reason