Class: PasswordsController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- PasswordsController
- Defined in:
- app/controllers/passwords_controller.rb
Instance Attribute Summary
Attributes included from Authentication
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/controllers/passwords_controller.rb', line 5 def create if (user = User.find_by(email_address: params[:email_address])) PasswordsMailer.reset(user).deliver_later end ok end |
#update ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/passwords_controller.rb', line 13 def update if @user.update(params.require(:user).permit(:password, :password_confirmation)) ok else head :not_acceptable end end |