Class: ExceptionHunter::ErrorsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ExceptionHunter::ErrorsController
- Includes:
- Pagy::Backend
- Defined in:
- app/controllers/exception_hunter/errors_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 10 11 |
# File 'app/controllers/exception_hunter/errors_controller.rb', line 7 def index @errors = ErrorGroup.all.order(created_at: :desc) @errors_count = Error.count @month_errors = Error.in_current_month.count end |
#show ⇒ Object
13 14 15 16 |
# File 'app/controllers/exception_hunter/errors_controller.rb', line 13 def show @pagy, errors = pagy(most_recent_errors, items: 1) @error = ErrorPresenter.new(errors.first) end |