Module: Warden::Mixins::Common
- Defined in:
- lib/devise/rails/warden_compat.rb
Overview
Taken from RailsWarden, thanks to Hassox. github.com/hassox/rails_warden
Instance Method Summary collapse
-
#cookies ⇒ Object
Proxy to request cookies.
- #raw_session ⇒ Object
-
#request ⇒ Object
Gets the rails request object by default if it’s available.
- #reset_session! ⇒ Object
Instance Method Details
#cookies ⇒ Object
Proxy to request cookies
23 24 25 |
# File 'lib/devise/rails/warden_compat.rb', line 23 def request. end |
#raw_session ⇒ Object
13 14 15 |
# File 'lib/devise/rails/warden_compat.rb', line 13 def raw_session request.session end |
#request ⇒ Object
Gets the rails request object by default if it’s available
4 5 6 7 8 9 10 11 |
# File 'lib/devise/rails/warden_compat.rb', line 4 def request return @request if @request if env['action_controller.rescue.request'] @request = env['action_controller.rescue.request'] else Rack::Request.new(env) end end |
#reset_session! ⇒ Object
17 18 19 20 |
# File 'lib/devise/rails/warden_compat.rb', line 17 def reset_session! raw_session.inspect # why do I have to inspect it to get it to clear? raw_session.clear end |