From 4d4dba1550b1442b6ec531b71ab94edc2cecb96f Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Thu, 27 Sep 2018 14:30:31 +0200 Subject: [PATCH] Procedure: small renaming on mean_time --- app/models/procedure.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/procedure.rb b/app/models/procedure.rb index 80e5629e7..8f9c31861 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -405,7 +405,7 @@ class Procedure < ApplicationRecord times = dossiers .state_termine .pluck(start_attribute, end_attribute) - .map { |times| times[1] - times[0] } + .map { |(start_date, end_date)| end_date - start_date } if times.present? times.sum.fdiv(times.size).ceil