I just issued a [ script/generate scaffold User ] command to generate my files. All the CRUD pages work well so that's good and now I'm trying to create more pages. I create a method in the user_controller.rb file as follows:
def login
#blahblah
end
Then created app/views/users/login.html.erb for the view. When I tried accessing it through the browser [http://localhost:3000/users/login] it gives out the error:
ActiveRecord::RecordNotFound (Couldn't find User with ID=login): app/controllers/users_controller.rb:16:in `show'
I'm interpreting it as using the action show and it doesn't recognize login as an action. Am I missing some configuration for this action to work? I'm quite new to Rails so I might be missing something trivial. Thanks!
UPDATE I tried using [script/generate controller User] then created action methods in the controller and it's corresponding views. It seems to work as predicted. What makes the difference between the two and what causes the creation of additional action methods when using script/generate scaffold not available?