Commit 3d9b5b5701497a89638c035ce987a02eba0309d3
1 parent
a42e634d
Exists in
master
Add check for profile completion. hardcoded for juv
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
lib/ext/person.rb
... | ... | @@ -6,6 +6,17 @@ class Person |
6 | 6 | |
7 | 7 | attr_accessible :orientacao_sexual, :identidade_genero, :transgenero, :tipo, :etnia |
8 | 8 | |
9 | + def is_profile_complete? | |
10 | + #FIXME: this check is hardcoded to satisfy a temporary issue. | |
11 | + #a better fix is being implemented already | |
12 | + !(self.name.blank? or | |
13 | + (self.data[:identidade_genero].blank? and self.data[:transgenero].blank?) or | |
14 | + self.data[:etnia].blank? or | |
15 | + self.data[:orientacao_sexual].blank? or | |
16 | + self.data[:state].blank? or | |
17 | + self.data[:city].blank?) | |
18 | + end | |
19 | + | |
9 | 20 | def conference_comments |
10 | 21 | Profile['conferencia'].comments_received.where(author_id: id) |
11 | 22 | end | ... | ... |