Class: UserResetPasswordManager

Inherits:
Object
  • Object
show all
Defined in:
app/managers/user_reset_password_manager.rb

Instance Method Summary collapse

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(options={})
	@user   = options[:user]
	@params = options[:params]
end

Instance Method Details

#processObject



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_instructionsObject



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