X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..3251cdf5d6d4ce51e52d96f52f266ab37f1fa695:/app/models/access_token.rb diff --git a/app/models/access_token.rb b/app/models/access_token.rb index 2bf226784..f690c9754 100644 --- a/app/models/access_token.rb +++ b/app/models/access_token.rb @@ -4,7 +4,7 @@ class AccessToken < OauthToken scope :valid, -> { where(:invalidated_at => nil) } - validates_presence_of :user, :secret + validates :user, :secret, :presence => true before_create :set_authorized_at