X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/20a861392e1ee7970da5d95b546aa8551faaf27b..6b0d4dcab2c72397dbbabd768e47323c0e2e42b2:/app/models/access_token.rb?ds=sidebyside diff --git a/app/models/access_token.rb b/app/models/access_token.rb index b773310ce..3aa6f9daf 100644 --- a/app/models/access_token.rb +++ b/app/models/access_token.rb @@ -1,5 +1,11 @@ -class AccessToken { where(:invalidated_at => nil) } + + validates_presence_of :user, :secret + before_create :set_authorized_at protected @@ -7,4 +13,4 @@ protected def set_authorized_at self.authorized_at = Time.now end -end \ No newline at end of file +end