Class: Cathode::Token
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Cathode::Token
- Defined in:
- app/models/cathode/token.rb
Overview
Defines a token model to hold the API tokens.
Instance Method Summary collapse
-
#expire ⇒ Token
Expires the token by deactivating it and updating its ‘expired_at` field.
Instance Method Details
#expire ⇒ Token
Expires the token by deactivating it and updating its ‘expired_at` field.
10 11 12 13 |
# File 'app/models/cathode/token.rb', line 10 def expire update active: false, expired_at: Time.now self end |