RailsCasts Pro episodes are now free!

Learn more or hide this

davidboydell's Profile

GitHub User: davidboydell

Comments by

Avatar

Hi Shotsoft, I had the same problem as you, if you remove:

attr_accessor :email, :password, :password_confirmation

from user.rb

and add

ruby
  private
    def user_params
      params.require(:user).permit(:email, :password, :password_confirmation)
    end

to the end of users_controller.rb it should work. See Andreas Bjørn Hassing Nielsen's (above) reply for more information.

Once you've done this you just need to modify the create method so that is has

@user = User.new(user_params)