From ae5b4f62493a069b99916d394f7bc9fcfb5253a6 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Wed, 5 Apr 2017 15:11:44 +0200 Subject: [PATCH] Refactor Dossier#full_data_strings_array --- app/models/dossier.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index f0401ccc0..fda340de9 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -217,12 +217,9 @@ class Dossier < ActiveRecord::Base end def full_data_strings_array - array = [] - data_with_champs.each do |value| - value = value.to_s if !value.kind_of?(Time) && !value.nil? - array << value + data_with_champs.map do |value| + value.nil? || value.kind_of?(Time) ? value : value.to_s end - return array end def export_entreprise_data