From 6aff39dfed415139e9132ac9cf759679cf7fa5a2 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sat, 17 Jan 2026 22:15:13 -0800 Subject: [PATCH] Always show rack-mini-profiler in development --- app/controllers/application_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1a3d973e..17e7664d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,11 +12,9 @@ class ApplicationController < ActionController::Base before_action :save_return_to_path, if: ->(c) { c.controller_name == 'sessions' && c.action_name == 'new' } - # Enable profiling tools if logged in as admin. + # Enable profiling tools in development or when logged in as an admin. before_action do - if current_user && current_user.admin? - Rack::MiniProfiler.authorize_request - end + Rack::MiniProfiler.authorize_request if Rails.env.development? || current_user&.admin? end class AccessDenied < StandardError; end