Commit 97e2559067ef78632826e53dd2a7ad2a128f9638
1 parent
a5faa8d0
Exists in
master
Adds missing fields to person module
Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com>
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
lib/person_data_export.rb
@@ -9,6 +9,14 @@ module PersonDataExport | @@ -9,6 +9,14 @@ module PersonDataExport | ||
9 | 9 | ||
10 | attrs = person_softwares_attrs(attrs, person) | 10 | attrs = person_softwares_attrs(attrs, person) |
11 | 11 | ||
12 | + attrs = person_data_attr_to_hash(attrs, person) | ||
13 | + | ||
14 | + attrs | ||
15 | + end | ||
16 | + | ||
17 | + def person_data_attr_to_hash(attrs, person) | ||
18 | + attrs['articles-count'] = person.articles.count | ||
19 | + attrs['data'] = profile_attrs(person) | ||
12 | attrs | 20 | attrs |
13 | end | 21 | end |
14 | 22 | ||
@@ -51,7 +59,8 @@ module PersonDataExport | @@ -51,7 +59,8 @@ module PersonDataExport | ||
51 | profile = { | 59 | profile = { |
52 | "id" => profile.id, | 60 | "id" => profile.id, |
53 | "identifier" => profile.identifier, | 61 | "identifier" => profile.identifier, |
54 | - "name" => profile.name | 62 | + "name" => profile.name, |
63 | + "type" => profile.type | ||
55 | } | 64 | } |
56 | end | 65 | end |
57 | 66 |