Class: KeepAlive::KeepAliveController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/keep_alive_controller.rb,
app/controllers/keep_alive/keep_alive_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



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

def index
  no_of_rows = KeepAlive.config.no_of_rows

  respond_to do |format|
    format.xml { render :xml => {:total => no_of_rows}.to_xml(:root => "keep_alive")}
    format.json { render :json => {:keep_alive => {:total => no_of_rows}}}
    format.html { render :text => "No Of Rows : #{no_of_rows}"}
  end
end