Class: DashOverlord::UseCases::V1::Users::SaveUser
- Defined in:
- lib/dash_overlord/use_cases/v1/users/save_user.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
context_reader, #final, #initialize, perform, target, #target_valid?
Constructor Details
This class inherits a constructor from DashOverlord::UseCases::Base
Instance Method Details
#perform ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dash_overlord/use_cases/v1/users/save_user.rb', line 7 def perform if context.user.password.present? context.user.secured_password = context.user.password end return if context.user.save failure! \ :internal_server_error, I18n.t('v1.users.error_while_saving') end |