show unauthorized message in test environment

This commit is contained in:
Alex Turchyn authored and Pete Matsyburka committed 2025-02-06 13:41:16 +02:00
1 parent 974bb85fb7
commit a15624690b
1 file changed
+1 -1
+1 -1
View File
@@ -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)