开发者

Failure/Error: @user = User.create!(@attr)

I am following railstutorial.org on Chapter 7开发者_JAVA技巧 and when running tests I get the error

User password encryption has_password? method should be true if the passwords match Failure/Error: @user = User.create!(@attr) undefined method password' for #<User:0xa242d18> # ./spec/models/user_spec.rb:105:inblock (3 levels) in '

line 105 of user_spec.rb:105 is @u @user = User.create!(@attr)ser = User.create!(@attr)


Is your database updated? The users table should have a column 'password,' did you forget to run a migration?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜