Class: Iron::PasswordsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Iron::PasswordsController
- Defined in:
- app/controllers/iron/passwords_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/iron/passwords_controller.rb', line 11 def create if (person = Person.find_by(email_address: params[:email_address])) && person.active? Iron::PasswordsMailer.reset(person.user).deliver_later end redirect_to sign_in_url, notice: t("iron.passwords.notifications.reset_instructions_sent") end |
#edit ⇒ Object
19 20 |
# File 'app/controllers/iron/passwords_controller.rb', line 19 def edit end |
#new ⇒ Object
8 9 |
# File 'app/controllers/iron/passwords_controller.rb', line 8 def new end |
#update ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/iron/passwords_controller.rb', line 22 def update if @person.update(params.permit(:password, :password_confirmation)) redirect_to sign_in_url, notice: t("iron.passwords.notifications.reset_success") else redirect_to edit_password_url(params[:token]), alert: t("iron.passwords.alerts.passwords_mismatch") end end |