From a15624690b86d25100e3b9c73b92b4c8f9efbedd Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Wed, 5 Feb 2025 21:18:35 +0200 Subject: [PATCH] show unauthorized message in test environment --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a48146ee..a3cb0242 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -30,7 +30,7 @@ class ApplicationController < ActionController::Base redirect_to request.referer, alert: 'Too many requests', status: :too_many_requests end - if Rails.env.production? + if Rails.env.production? || Rails.env.test? rescue_from CanCan::AccessDenied do |e| Rollbar.warning(e) if defined?(Rollbar)