X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8ae5d94b2f16d6f2cf1739e19ebc3793a18a0a4a..7a435df917edbad034db908b7a00d14d31b7396b:/app/models/access_token.rb?ds=sidebyside diff --git a/app/models/access_token.rb b/app/models/access_token.rb index 1f172c5f0..3aa6f9daf 100644 --- a/app/models/access_token.rb +++ b/app/models/access_token.rb @@ -2,9 +2,9 @@ class AccessToken < OauthToken belongs_to :user belongs_to :client_application - scope :valid, where(:invalidated_at => nil) + scope :valid, -> { where(:invalidated_at => nil) } - validates_presence_of :user + validates_presence_of :user, :secret before_create :set_authorized_at