-
-
Save phensalves/9ef2ea4755ca71416193dc23cc59debc to your computer and use it in GitHub Desktop.
veshe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if params[:user][:current_password] #Changing with password | |
if resource.update_with_password(params[:user]) | |
if is_flashing_format? | |
flash_key = update_needs_confirmation?(resource, prev_unconfirmed_email) ? | |
:update_needs_confirmation : :updated | |
set_flash_message :notice, flash_key | |
end | |
sign_in resource_name, resource, bypass: true | |
respond_with resource, location: after_update_path_for(resource) | |
else | |
clean_up_passwords resource | |
render 'change_password' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment