From 15d1b01a90e6f312dfe2e257ed34d5926849c0c1 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 27 Aug 2018 22:34:01 +0200 Subject: [PATCH] Code simplification --- app/controllers/stats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index 51c011012..7b7dacdc6 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -198,7 +198,7 @@ class StatsController < ApplicationController count_per_administrateur = procedures.group(:administrateur_id).count.values { 'Une procédure' => count_per_administrateur.select { |count| count == 1 }.count, - 'Entre deux et cinq procédures' => count_per_administrateur.select { |count| 2 <= count && count <= 5 }.count, + 'Entre deux et cinq procédures' => count_per_administrateur.select { |count| count.in?(2..5) }.count, 'Plus de cinq procédures' => count_per_administrateur.select { |count| 5 < count }.count } end