small medium large xlarge

07 Aug 2008, 21:03
Mark Duncan (2 posts)

I feel like i’m doing something stupid here, when I hit the Add User button it’s going directly to user_controller:index. I’ve dropped some logger.error lines into the create section and it’s never getting there just directly into index. My form tag seems to be okay* but I must be missing something. Been going over this for an hour and can’t find a problem, can anyone help?


08 Aug 2008, 00:33
Sam Ruby (633 posts)

First, check to make sure that “config/routes.rb”: contains the line:

map.resources :users

But I have a hunch. By any chance did you skip the instruction on the bottom of page 158 to restart your server? If so: I don’t know if this will make you feel any better, but I spend an entire day figuring out that that was necessary.

08 Aug 2008, 08:32
Mark Duncan (2 posts)

Thank you, I’m sure I’d have thought of it eventually but you’ve probably saved me a few hours of head-scratching.

If there was a Computer Bible it would start “In the beginning there was the phrase, and the phrase was ‘Have you tried switching it off and on again?’. And He did and He saw that it was good”

You must be logged in to comment