Tag: 会话状态

Rails 3个额外的会话配置选项(key,expires_after,secure)

有人可以指出新的Rails 3.x会话配置选项是什么? 我正在尝试复制我在Rails 2.3.x应用程序中的相同配置。 这是我在应用程序中使用的配置: #environment.rb config.action_controller.session_store = :active_record_store config.action_controller.session = { :key => ‘_something’, #non-secure for development :secret => ‘really long random string’ } # production.rb – override environment.rb for production config.action_controller.session = { :key => ‘_something_secure’, :secret => ‘really long random string’, :expire_after => 60*60,#time in seconds :secure => true #The session will […]