Skip to content

Instantly share code, notes, and snippets.

@radar
Created November 28, 2009 12:41
Show Gist options
  • Save radar/244496 to your computer and use it in GitHub Desktop.
Save radar/244496 to your computer and use it in GitHub Desktop.
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