Class: Rscratch::DashboardController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rscratch/dashboard_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate

Instance Method Details

#indexObject



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

def index
  @activity_log = Rscratch::ExceptionLog.select("count(id) as exception_count, date(created_at) as date").group("date(created_at)").order("date(created_at)").last(30)
  respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @activity_log }
  end      
end