Module: ActionDispatch::Session::Compatibility

Included in:
AbstractStore, CookieStore, MemCacheStore
Defined in:
actionpack/lib/action_dispatch/middleware/session/abstract_store.rb

Instance Method Summary collapse

Instance Method Details

#generate_sidObject



31
32
33
34
35
# File 'actionpack/lib/action_dispatch/middleware/session/abstract_store.rb', line 31

def generate_sid
  sid = SecureRandom.hex(16)
  sid.encode!('UTF-8') if sid.respond_to?(:encode!)
  sid
end

#initialize(app, options = {}) ⇒ Object



26
27
28
29
# File 'actionpack/lib/action_dispatch/middleware/session/abstract_store.rb', line 26

def initialize(app, options = {})
  options[:key] ||= '_session_id'
  super
end