X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6c2093b29d74b145b85e61c4fff09b5f13afa0e5..b96391e456fd7bddf28b8e283d74f081b5d3ec99:/app/models/client_application.rb?ds=sidebyside diff --git a/app/models/client_application.rb b/app/models/client_application.rb index 1d5922d8e..5dafaaa5c 100644 --- a/app/models/client_application.rb +++ b/app/models/client_application.rb @@ -30,8 +30,6 @@ # client_applications_user_id_fkey (user_id => users.id) # -require "oauth" - class ClientApplication < ActiveRecord::Base belongs_to :user has_many :tokens, :class_name => "OauthToken", :dependent => :delete_all @@ -51,7 +49,7 @@ class ClientApplication < ActiveRecord::Base def self.find_token(token_key) token = OauthToken.includes(:client_application).find_by(:token => token_key) - token if token && token.authorized? + token if token&.authorized? end def self.verify_request(request, options = {}, &block)