Class: Monimoni::MainController

Inherits:
ApplicationController show all
Defined in:
app/controllers/monimoni/main_controller.rb

Instance Method Summary collapse

Instance Method Details

#aliveObject



3
4
5
6
7
8
9
10
# File 'app/controllers/monimoni/main_controller.rb', line 3

def alive
  begin
    Monimoni::Model.find(1)
    render :json => {:hostname => Socket.gethostname}
  rescue ActiveRecord::RecordNotFound
    render :nothing => true, :status => 404
  end
end