lib/switch_user/provider/devise.rb in switch_user-1.4.0 vs lib/switch_user/provider/devise.rb in switch_user-1.5.0
- old
+ new
@@ -4,22 +4,22 @@
def initialize(controller)
@controller = controller
@warden = @controller.warden
end
- def login(user, scope = :user)
+ def login(user, scope = nil)
if SwitchUser.provider.is_a?(Hash) && SwitchUser.provider[:store_sign_in]
@warden.set_user(user, scope: scope)
else
@warden.session_serializer.store(user, scope)
end
end
- def logout(scope = :user)
+ def logout(scope = nil)
@warden.logout(scope)
end
- def current_user(scope = :user)
+ def current_user(scope = nil)
@warden.user(scope)
end
end
end
end