Rails session 问题

kitt · April 14, 2013 · Last by zgm replied at April 15, 2013 · 2294 hits

在登陆 action 重我写了 session[:user_id] =user.id 然后在其他的 controller 中怎么取不到 session[:user_id] 呢,是个 nil

没有开启 Cookie,如果是用了 CookieStore 的话?

??怎么开启?

config.action_controller.perform_caching 这个等于 true 就是开启了吧,但是没有用呢

#3 楼 @kitt 跟这个无关,现在的信息也看不出问题。

源码放上 github 看看。

show us the code .

You need to Sign in before reply, if you don't have an account, please Sign up first.