X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..d49922eb630abb73c7faffb650ab97b3c5d94c52:/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