Skip to content

Instantly share code, notes, and snippets.

@marcamillion
Created October 8, 2012 04:26
Show Gist options
  • Save marcamillion/3850723 to your computer and use it in GitHub Desktop.
Save marcamillion/3850723 to your computer and use it in GitHub Desktop.
def update
@client = current_user.clients.find(params[:id])
respond_to do |format|
if @client.update_attributes(params[:client])
format.html { redirect_to @client, notice: 'Client was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @client.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