railstutorial.org, Chapter 6. unknown attribute: password

后端 未结 6 699
感动是毒
感动是毒 2021-01-05 14:11

I have finished Chapter 6 of railstutorial but all my User model specs have started failing soon after I added password & password_confirmation

6条回答
  •  囚心锁ツ
    2021-01-05 14:45

    Just add has_secure_password into User model file if you haven't done this yet.

    class User < ActiveRecord::Base
     attr_accessible :email, :name, :password, :password_confirmation
     has_secure_password
     # ..
    end
    

提交回复
热议问题