Created
October 8, 2012 04:26
-
-
Save marcamillion/3850723 to your computer and use it in GitHub Desktop.
This file contains 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 | |
@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