Class: RailsLiveDashboard::Widgets::SlowestQueriesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/rails_live_dashboard/widgets/slowest_queries_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



4
5
6
7
8
# File 'app/controllers/rails_live_dashboard/widgets/slowest_queries_controller.rb', line 4

def show
  @queries = Query
    .order(Arel.sql("cast(content->>'duration' as float) DESC"))
    .limit(5)
end