Sha256: 69d7d279440b444468044151360a50699a8389e5cd813793b8e75ae4a96d2c9a

Contents?: true

Size: 265 Bytes

Versions: 4

Compression:

Stored size: 265 Bytes

Contents

module RailsLiveDashboard
  module Widgets
    class SlowestRequestsController < ApplicationController
      def show
        @requests = Request
          .order(Arel.sql("cast(content->>'duration' as float) DESC"))
          .limit(5)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_live_dashboard-0.2.0 app/controllers/rails_live_dashboard/widgets/slowest_requests_controller.rb
rails_live_dashboard-0.1.2 app/controllers/rails_live_dashboard/widgets/slowest_requests_controller.rb
rails_live_dashboard-0.1.1 app/controllers/rails_live_dashboard/widgets/slowest_requests_controller.rb
rails_live_dashboard-0.1.0 app/controllers/rails_live_dashboard/widgets/slowest_requests_controller.rb