Class: PasswordResetsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PasswordResetsController
- Defined in:
- app/controllers/password_resets_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/password_resets_controller.rb', line 8 def create @user = User.find_by_email(params[:email]) if @user @user.reset_perishable_token! UserMailer.password_reset(@user).deliver flash[Rails.application.config.constellation.authentication.success_flash] = t("constellation.authentication.password_resets.create.success_flash") redirect_to Rails.application.config.constellation.authentication.password_reset_redirection else flash.now[Rails.application.config.constellation.authentication.failure_flash] = t("constellation.authentication.password_resets.create.failure_flash") render :action => :new end end |
#edit ⇒ Object
21 22 23 |
# File 'app/controllers/password_resets_controller.rb', line 21 def edit render end |
#new ⇒ Object
5 6 |
# File 'app/controllers/password_resets_controller.rb', line 5 def new end |
#update ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/password_resets_controller.rb', line 25 def update @user.password = params[:user][:password] @user.password_confirmation = params[:user][:password_confirmation] if @user.save flash[Rails.application.config.constellation.authentication.success_flash] = t("constellation.authentication.password_resets.update.success_flash") redirect_to Rails.application.config.constellation.authentication.signin_redirection else render :action => :edit end end |