small medium large xlarge

26 Jun 2011, 22:52
David Slone (1 post)

I am having some issues with creating a user, I get the following error:

Started POST “/users” for XXX at 2011-06-26 18:47:30 -0400 Processing by UsersController#create as HTML Parameters: {“utf8”=>”✓”, “authenticity_token”=>”uFf9QHp+ub90vveQLruENTbKedq8WnsQB6HWg/xXxlg=”, “user”=>{“name”=>”test”, “password”=>”[FILTERED]”, “password_confirmation”=>”[FILTERED]”}, “commit”=>”Create User”} Completed 500 Internal Server Error in 17ms

NoMethodError (undefined method salt=' for #<User:0x0000001cf2fdc0>): app/models/user.rb:41:in generate_salt’ app/models/user.rb:29:in password=' app/controllers/users_controller.rb:43:in new’ app/controllers/users_controller.rb:43:in `create’

I have tried copying both the user.rb and the users_controller.rb from the code provided for the book and still can’t seem to solve the issue. I’m sure this is something stupid that I am missing but I can’t seem to find the problem.

Thanks in advance for your help.

You must be logged in to comment