Created
August 15, 2017 07:03
-
-
Save fuzzygroup/7dec79f94deac117ce591598243f596a 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
class HealthController < ApplicationController | |
def index | |
results = {:status => "ok"} | |
respond_to do |format| | |
format.html { render :status => 200, :html => "ok" and return } | |
format.json { render :status => 200, :json => results.to_json and return } | |
end | |
end | |
end | |
# This is called from a routes file like this: | |
Rails.application.routes.draw do | |
get '/health', to: "health#index" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment