【发布时间】:2011-02-17 21:23:20
【问题描述】:
我对设计 gem 配置设置感到困惑:
# The time the user will be remembered without asking for credentials again.
config.remember_for = 2.weeks
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again.
config.timeout_in = 10.minutes
我想让用户选中“记住我”复选框(即让我保持登录状态),但默认会话超时为 10 分钟。 10 分钟后,即使我点击了“记住我”,它也会要求我再次登录。如果这是真的,那么 remember_for 真的毫无意义。显然我在这里遗漏了一些东西。
【问题讨论】:
-
我认为你不应该同时使用这两种配置。
标签: ruby-on-rails session devise