1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/lib/devise/hooks/proxy.rb
2014-02-25 22:12:55 +05:30

21 lines
451 B
Ruby

module Devise
module Hooks
# A small warden proxy so we can remember, forget and
# sign out users from hooks.
class Proxy #:nodoc:
include Devise::Controllers::Rememberable
include Devise::Controllers::SignInOut
attr_reader :warden
delegate :cookies, :env, to: :warden
def initialize(warden)
@warden = warden
end
def session
warden.request.session
end
end
end
end