Class: SessionStoreRelocator::CookieToRedis

Inherits:
ActionDispatch::Session::CookieStore
  • Object
show all
Defined in:
lib/session_store_relocator/cookie_to_redis.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CookieToRedis.



5
6
7
8
# File 'lib/session_store_relocator/cookie_to_redis.rb', line 5

def initialize(app, options = {})
  super(app, options[:cookie_store])
  @redis_session_store = RedisSessionStore.new(app, options[:redis_session_store])
end

Instance Method Details

#commit_session(*args) ⇒ Object



16
17
18
19
20
# File 'lib/session_store_relocator/cookie_to_redis.rb', line 16

def commit_session(*args)
  super.tap do
    @redis_session_store.send(:commit_session, *args)
  end
end

#destroy_session(*args) ⇒ Object



10
11
12
13
14
# File 'lib/session_store_relocator/cookie_to_redis.rb', line 10

def destroy_session(*args)
  super.tap do
    @redis_session_store.send(:destroy_session, *args)
  end
end