Code simplification
This commit is contained in:
parent
3f0e61d292
commit
15d1b01a90
1 changed files with 1 additions and 1 deletions
|
@ -198,7 +198,7 @@ class StatsController < ApplicationController
|
||||||
count_per_administrateur = procedures.group(:administrateur_id).count.values
|
count_per_administrateur = procedures.group(:administrateur_id).count.values
|
||||||
{
|
{
|
||||||
'Une procédure' => count_per_administrateur.select { |count| count == 1 }.count,
|
'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
|
'Plus de cinq procédures' => count_per_administrateur.select { |count| 5 < count }.count
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue