]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/oauth_token.rb
Merge remote-tracking branch 'upstream/pull/3403'
[rails.git] / app / models / oauth_token.rb
index fd332723f25c07333cf2ca5d2483ea671887f121..affdcdeb815b45b3c6d6ad32bf9c6526064ee45b 100644 (file)
@@ -35,7 +35,7 @@
 #  oauth_tokens_user_id_fkey                (user_id => users.id)
 #
 
-class OauthToken < ActiveRecord::Base
+class OauthToken < ApplicationRecord
   belongs_to :client_application
   belongs_to :user
 
@@ -52,7 +52,7 @@ class OauthToken < ActiveRecord::Base
   end
 
   def invalidate!
-    update_attributes(:invalidated_at => Time.now)
+    update(:invalidated_at => Time.now)
   end
 
   def authorized?