Skip to content

Commit

Permalink
export roles in camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 7, 2021
1 parent 62de6f9 commit 9735fb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/exports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9735fb3

Please sign in to comment.