Commit c97d57e25b51447d51d6d1ed9c624fc3b9564914
1 parent
4a73eb90
Exists in
master
and in
1 other branch
Add methods for profile_completion rule
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
lib/ext/person.rb
| @@ -5,4 +5,10 @@ class Person | @@ -5,4 +5,10 @@ class Person | ||
| 5 | # TODO why this relationship doesn't exists in core? | 5 | # TODO why this relationship doesn't exists in core? |
| 6 | has_many :comments, :foreign_key => 'author_id' | 6 | has_many :comments, :foreign_key => 'author_id' |
| 7 | 7 | ||
| 8 | + def profile_completion_score_condition | ||
| 9 | + self.points(category: 'profile_completion') == 0 and self.is_profile_complete? | ||
| 10 | + end | ||
| 11 | + def is_profile_complete? | ||
| 12 | + true | ||
| 13 | + end | ||
| 8 | end | 14 | end |