Catch :warden correctly

pull/6/head
Eugen Rochko 2016-10-03 19:19:03 +02:00
parent feda1e6554
commit b078885414
1 changed files with 4 additions and 7 deletions

View File

@ -9,14 +9,11 @@ module ApplicationCable
protected
def find_verified_user
catch :warden do
verified_user = env['warden'].user
if verified_user
verified_user
else
reject_unauthorized_connection
return verified_user if verified_user
end
rescue :warden
reject_unauthorized_connection
end
end