Routes not working

Hello everyone,
I’ve been using RoR for awhile now, but I’m new to Rails 3… I’m
trying to follow a tutorial that creates a registration page that
creates a user. Simple enough, right? When I go to
server:3000/user/register, it comes up with my registration page
fine. However, when I submit it (form_for :user) it complains that my
route (user/register) does not exist… Not quite sure whats going
on… In routes.rb, I have ‘get “user/register”’ listed.

Can anyone clarify what I might be doing wrong?

Thanks,

  • Jeff

Try doing this instead, and see if this helps:
form_for User.new

John Maxwell wrote in post #976103:

Try doing this instead, and see if this helps:
form_for User.new

Thanks for the suggestion, unfortunately that doesn’t work either - it
gives me a NoMethodError…

I just figured it out - I added a line in my routes.rb under ‘get
“user/register”’ that reads ‘post “user/register”’ …

Does anybody know why this wasn’t there to begin with?

Thanks,

  • Jeff