Class: Devise::Oauth2Providable::Client
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Devise::Oauth2Providable::Client
- Defined in:
- app/models/devise/oauth2_providable/client.rb
Instance Method Summary collapse
Instance Method Details
#expire_tokens_for_user(user) ⇒ Object
12 13 14 |
# File 'app/models/devise/oauth2_providable/client.rb', line 12 def expire_tokens_for_user(user) access_tokens.where(user_id: user.id).where('expires_at > ?', Time.zone.now).update_all(expires_at: Time.zone.now) end |