Class: UserResetPasswordManager
- Inherits:
-
Object
- Object
- UserResetPasswordManager
- Defined in:
- app/managers/user_reset_password_manager.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ UserResetPasswordManager
constructor
A new instance of UserResetPasswordManager.
- #process ⇒ Object
- #send_instructions ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ UserResetPasswordManager
Returns a new instance of UserResetPasswordManager.
2 3 4 5 |
# File 'app/managers/user_reset_password_manager.rb', line 2 def initialize(={}) @user = [:user] @params = [:params] end |
Instance Method Details
#process ⇒ Object
13 14 15 16 17 |
# File 'app/managers/user_reset_password_manager.rb', line 13 def process return false unless valid_params? @user.update_attributes(password: @params[:password]) end |
#send_instructions ⇒ Object
7 8 9 10 11 |
# File 'app/managers/user_reset_password_manager.rb', line 7 def send_instructions @user.send_reset_password_instructions if @user.present? true end |