Class: SessionStoreRelocator::CookieToRedis
- Inherits:
-
ActionDispatch::Session::CookieStore
- Object
- ActionDispatch::Session::CookieStore
- SessionStoreRelocator::CookieToRedis
- Defined in:
- lib/session_store_relocator/cookie_to_redis.rb
Instance Method Summary collapse
- #commit_session(*args) ⇒ Object
- #destroy_session(*args) ⇒ Object
-
#initialize(app, options = {}) ⇒ CookieToRedis
constructor
A new instance of CookieToRedis.
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, = {}) super(app, [:cookie_store]) @redis_session_store = RedisSessionStore.new(app, [: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 |