Class: ExceptionHunter::ErrorsController
Instance Method Summary
collapse
#authenticate_admin_user_class, #redirect_to_login, #underscored_admin_user_class
Instance Method Details
#destroy ⇒ Object
18
19
20
21
22
|
# File 'app/controllers/exception_hunter/errors_controller.rb', line 18
def destroy
ErrorReaper.purge
redirect_back fallback_location: errors_path, notice: 'Errors purged successfully'
end
|
#index ⇒ Object
7
8
9
10
11
|
# File 'app/controllers/exception_hunter/errors_controller.rb', line 7
def index
@dashboard = DashboardPresenter.new(current_tab)
shown_errors = errors_for_tab(@dashboard).order(updated_at: :desc).distinct
@errors = ErrorGroupPresenter.wrap_collection(shown_errors)
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
|