开发者

Devise logs in, but doesn't seem to set session

I just upgraded to Devise 1.2 and开发者_高级运维 now I can login, but then when I go to another page and the before_filter calls authenticate_account! (because my model is 'account', not 'user') it returns false, meaning I'm not logged it. It's as if the session cookie isn't getting created. What would cause this? I can't figure out how to track down what could be causing this. Thanks.


or add before_filter :authenticate_user! in application controller

class ApplicationController < ActionController::Base
  before_filter :authenticate_user!
  protect_from_forgery 
end


You have to create this for your before filter in your controllers:

before_filter :authenticate_user!
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜