Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
# POST /locations
# POST /locations.json
def create
@location = Location.new(params[:location])
respond_to do |format|
if @location.save
format.html { redirect_to @location, notice: 'Location was successfully created.' }
format.json { render json: @location, status: :created, location: @location }
else
format.html { render action: "new" }
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.