From 325afc5ab1eaddbdc02fc924f83b38e56869d1a3 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 18 Feb 2026 18:21:49 +0530 Subject: [PATCH] style: replace case-when with hash lookup in dimension_type_to_rollup --- app/builders/v2/reports/concerns/rollup_conditions.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/builders/v2/reports/concerns/rollup_conditions.rb b/app/builders/v2/reports/concerns/rollup_conditions.rb index aae87e8f8..9300e8c5c 100644 --- a/app/builders/v2/reports/concerns/rollup_conditions.rb +++ b/app/builders/v2/reports/concerns/rollup_conditions.rb @@ -70,15 +70,6 @@ module V2::Reports::Concerns::RollupConditions end def dimension_type_to_rollup - case params[:type].to_s - when 'account' - :account - when 'agent' - :agent - when 'inbox' - :inbox - when 'team' - :team - end + { 'account' => :account, 'agent' => :agent, 'inbox' => :inbox, 'team' => :team }[params[:type].to_s] end end