From 9735fb302f79f38deac189dab0e8ab32791794bb Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 7 Apr 2021 11:40:23 +0200 Subject: [PATCH] export roles in camelCase --- app/controllers/exports_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb index 19c83214b..8bfc87acf 100644 --- a/app/controllers/exports_controller.rb +++ b/app/controllers/exports_controller.rb @@ -30,8 +30,8 @@ def contacts "fabricaId" => contact.provider.symbol + "-" + contact.email, "email" => contact.email, "firstName" => contact.given_name, - "lastName" => contact.family_name, - "type" => contact.role_name ? contact.role_name.join(";") : nil, + "lastName" => contact.family_name.present? ? contact.family_name : contact.email, + "type" => contact.role_name ? contact.role_name.map { |r| r.camelize(:lower) }.join(";") : nil, "createdAt" => export_date_string(contact.created_at), "modifiedAt" => export_date_string(contact.updated_at), "deletedAt" => contact.deleted_at.present? ? export_date_string(contact.deleted_at) : nil,