# oauth_tokens_user_id_fkey (user_id => users.id)
#
-class OauthToken < ActiveRecord::Base
+class OauthToken < ApplicationRecord
belongs_to :client_application
belongs_to :user
end
def invalidate!
- update_attributes(:invalidated_at => Time.now)
+ update(:invalidated_at => Time.now)
end
def authorized?