Class: User::Operation::ResetPassword
- Inherits:
-
Trailblazer::Operation
- Object
- Trailblazer::Operation
- User::Operation::ResetPassword
- Defined in:
- app/concepts/morpho/user/operation/reset_password.rb
Instance Method Summary collapse
- #check(options) ⇒ Object
- #find(options) ⇒ Object
- #not_allowed(options) ⇒ Object
- #not_delivered(options) ⇒ Object
- #not_found(options) ⇒ Object
- #not_valid(options) ⇒ Object
- #render(options) ⇒ Object
- #reset_password_email(options) ⇒ Object
- #validate(options) ⇒ Object
Instance Method Details
#check(options) ⇒ Object
21 22 23 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 21 def check (, **) !['model'].external? end |
#find(options) ⇒ Object
17 18 19 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 17 def find (, **) ['model'] = Morpho::User.find_by(email: ['data']['email']) end |
#not_allowed(options) ⇒ Object
37 38 39 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 37 def not_allowed (, **) ['error'] = :not_allowed end |
#not_delivered(options) ⇒ Object
41 42 43 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 41 def not_delivered (, **) ['error'] = :not_delivered end |
#not_found(options) ⇒ Object
33 34 35 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 33 def not_found (, **) ['error'] = :not_found end |
#not_valid(options) ⇒ Object
29 30 31 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 29 def not_valid (, **) ['error'] = :not_valid end |
#render(options) ⇒ Object
45 46 47 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 45 def render (, **) ['model'] end |
#reset_password_email(options) ⇒ Object
25 26 27 |
# File 'app/concepts/morpho/user/operation/reset_password.rb', line 25 def reset_password_email (, **) ['model'].deliver_reset_password_instructions! end |