Method: PasswordResetsController#update
- Defined in:
- app/controllers/password_resets_controller.rb
#update ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/password_resets_controller.rb', line 29 def update if params[:spud_user][:password].blank? @user.errors.add(:password, 'must not be blank') else @user.password = params[:spud_user][:password] @user.password_confirmation = params[:spud_user][:password_confirmation] if @user.save() SpudUserSession.create(@user) flash[:notice] = 'Password successfully updated' redirect_back_or_default(root_path) return end end render 'show' end |