Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.