Skip to content

Instantly share code, notes, and snippets.

@dankozlowski
Created February 14, 2011 21:26
Show Gist options
  • Save dankozlowski/826583 to your computer and use it in GitHub Desktop.
Save dankozlowski/826583 to your computer and use it in GitHub Desktop.
def update
@organization = current_user.organizations.find(params[:id])
respond_to do |format|
if @organization.update_attributes(params[:organization])
format.html { redirect_to(@organization, :notice => 'Organization was successfully updated.') }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @organization.errors, :status => :unprocessable_entity }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment