Class: LcpRuby::Actions::ApiTokens::Revoke
- Inherits:
-
BaseAction
- Object
- BaseAction
- LcpRuby::Actions::ApiTokens::Revoke
- Defined in:
- lib/lcp_ruby/actions/api_tokens/revoke.rb
Instance Attribute Summary
Attributes inherited from BaseAction
#current_user, #model_class, #params, #record, #records
Instance Method Summary collapse
Methods inherited from BaseAction
authorized?, batch_capable?, #initialize, param_schema, visible?
Constructor Details
This class inherits a constructor from LcpRuby::Actions::BaseAction
Instance Method Details
#call ⇒ Object
5 6 7 8 9 |
# File 'lib/lcp_ruby/actions/api_tokens/revoke.rb', line 5 def call @record.update!(revoked_at: Time.current) success(message: I18n.t("lcp_ruby.api_tokens.revoked", default: "Token revoked.")) end |