public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# 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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.