Skip to content

@johnivanoff /gist:1998071
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
# PUT /locations/1
# PUT /locations/1.json
def update
@location = Location.find(params[:id])
respond_to do |format|
if @location.update_attributes(params[:location])
format.html { redirect_to @location, notice: 'Location was successfully updated.' }
format.json { head :ok }
else
format.html { render action: "edit" }
format.json { render json: @location.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
Something went wrong with that request. Please try again.