开发者

Rails 3 and devise, devise logging out when there are errors on user

I'm using devise for a site and it seem to be acting strangely.

I have a database boolean column on the user that stores preferences, lets call it show_help .

However in the view when logged in, if I call current_user.show_help , it throws an erros saying there is no such metho开发者_如何学运维d. I'm using current_user in other view for devise things such as current_user.email .

What stranger still is when this error is caused it logs out the current user and then you cannot log back in with out restarting the server.

I was wondering if anyone else knew what the problem was?


It sounds like there is an issue with your database. Try the following:

  • Check the user section of your db/schema.rb
  • run rake db:migrate
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜