Skip to content

Instantly share code, notes, and snippets.

@fuzzygroup
Created August 15, 2017 07:03
Show Gist options
  • Save fuzzygroup/7dec79f94deac117ce591598243f596a to your computer and use it in GitHub Desktop.
Save fuzzygroup/7dec79f94deac117ce591598243f596a to your computer and use it in GitHub Desktop.
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