Class: Booth::Core::Credentials::Create
- Inherits:
-
Object
- Object
- Booth::Core::Credentials::Create
- Includes:
- Logging, Calls
- Defined in:
- lib/booth/core/credentials/create.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/booth/core/credentials/create.rb', line 14 def call if credential.save log { "Successfully persisted a new Booth::Models::Credential record with ID #{credential.id.inspect}" } Tron.success :credential_created, credential: else log { 'Could not persist a new Booth::Models::Credential record' } Tron.failure :persistence_failed, error: credential.errors.to_a.to_sentence end end |