Created
November 28, 2009 12:41
-
-
Save radar/244496 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 | |
@user = User.find(params[:id]) | |
@user.photo = Photo.new(params[:user].delete(:photo)) | |
if @user.update_attributes(params[:user]) | |
flash[:notice] = "Account updated!" | |
redirect_to root_path | |
else | |
render :action => :edit | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment