Created
October 13, 2010 14:26
-
-
Save bogdan/624121 to your computer and use it in GitHub Desktop.
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
def update | |
old_email = @partner.email | |
@partner.attributes = params[:partner] | |
if @partner.partner_logo.save and @partner.save | |
#fire new password if email changed | |
unless @partner.email == old_email | |
@partner.change_password | |
flash[:notice] = I18n.translate "flashes.password_changed" | |
end | |
redirect_to admin_partner_matching_profiles_path(@partner) | |
else | |
render :action => :new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment