Class: SnapmonController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/snapmon_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/snapmon_controller.rb', line 5

def index
  if (ActiveRecord::Base.connection.execute("select 1 from dual").num_rows rescue 0) == 1
    render :text => "UP"
  else
    render :text => 'DOWN: Database', :status => :internal_server_error
  end
end

#loggerObject

Disable logger



14
15
16
# File 'app/controllers/snapmon_controller.rb', line 14

def logger
  nil
end