rubocop fixes
This commit is contained in:
parent
eacd9dae67
commit
50e7e400e1
1 changed files with 9 additions and 7 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
module ApplicationCable
|
module ApplicationCable
|
||||||
class Connection < ActionCable::Connection::Base
|
class Connection < ActionCable::Connection::Base
|
||||||
identified_by :current_user
|
identified_by :current_user
|
||||||
|
@ -8,9 +9,10 @@ module ApplicationCable
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def find_verified_user
|
def find_verified_user
|
||||||
verified_user = User.find_by(id: cookies.signed['user.id'])
|
verified_user = User.find_by(id: cookies.signed['user.id'])
|
||||||
if verified_user && cookies.signed['user.expires_at'] > Time.now
|
if verified_user && cookies.signed['user.expires_at'] > Time.now.getlocal
|
||||||
verified_user
|
verified_user
|
||||||
else
|
else
|
||||||
reject_unauthorized_connection
|
reject_unauthorized_connection
|
||||||
|
|
Loading…
Add table
Reference in a new issue