Skip to content

Commit

Permalink
Refactor hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCarlino committed Jul 2, 2020
1 parent e86d8d1 commit b831838
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/controllers/application_controller.rb
Expand Up @@ -10,13 +10,9 @@ def unset_current_device
def current_device
return @current_device if @current_device
authenticate_user! unless current_user
if current_user
@current_device = current_user.device || no_device
Device.send(:current=, @current_device)
@current_device
else
raise JWT::VerificationError
end
@current_device = (current_user && current_user.device) || no_device
Device.send(:current=, @current_device)
@current_device
end

def current_device_id
Expand Down

0 comments on commit b831838

Please sign in to comment.