X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f0feca800d91ac1d23eb63ca17a45d8fd4d41920..b3bd81fd4b5d9441c0edd58534ca5956a46c86bf:/app/models/oauth_token.rb diff --git a/app/models/oauth_token.rb b/app/models/oauth_token.rb index f9255e56c..0fe0bea30 100644 --- a/app/models/oauth_token.rb +++ b/app/models/oauth_token.rb @@ -2,7 +2,7 @@ class OauthToken < ActiveRecord::Base belongs_to :client_application belongs_to :user - scope :authorized, where("authorized_at IS NOT NULL and invalidated_at IS NULL") + scope :authorized, -> { where("authorized_at IS NOT NULL and invalidated_at IS NULL") } validates_uniqueness_of :token validates_presence_of :client_application, :token