RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: davidboydell
Hi Shotsoft, I had the same problem as you, if you remove:
attr_accessor :email, :password, :password_confirmation
from user.rb
and add
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)
Hi Shotsoft, I had the same problem as you, if you remove:
attr_accessor :email, :password, :password_confirmation
from user.rb
and add
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)