跳至内容 跳至搜索
方法
G
I
N

类公共方法

new(app, options = {})

# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 23
def initialize(app, options = {})
  options[:key] ||= "_session_id"
  super
end

实例公共方法

generate_sid()

# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 28
def generate_sid
  sid = SecureRandom.hex(16)
  sid.encode!(Encoding::UTF_8)
  sid
end

实例私有方法

initialize_sid()

# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 35
def initialize_sid # :doc:
  @default_options.delete(:sidbits)
  @default_options.delete(:secure_random)
end