From 97e2559067ef78632826e53dd2a7ad2a128f9638 Mon Sep 17 00:00:00 2001 From: David Carlos Date: Thu, 26 Mar 2015 16:38:26 -0300 Subject: [PATCH] Adds missing fields to person module --- lib/person_data_export.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/person_data_export.rb b/lib/person_data_export.rb index d39f3c3..b1853fe 100644 --- a/lib/person_data_export.rb +++ b/lib/person_data_export.rb @@ -9,6 +9,14 @@ module PersonDataExport attrs = person_softwares_attrs(attrs, person) + attrs = person_data_attr_to_hash(attrs, person) + + attrs + end + + def person_data_attr_to_hash(attrs, person) + attrs['articles-count'] = person.articles.count + attrs['data'] = profile_attrs(person) attrs end @@ -51,7 +59,8 @@ module PersonDataExport profile = { "id" => profile.id, "identifier" => profile.identifier, - "name" => profile.name + "name" => profile.name, + "type" => profile.type } end -- libgit2 0.21.2