From 09d49988711613ce616222e9651e466dd2129111 Mon Sep 17 00:00:00 2001 From: Hugo Melo Date: Wed, 23 Sep 2015 17:17:31 -0300 Subject: [PATCH] Add methods for profile_completion rule --- lib/ext/person.rb | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/ext/person.rb b/lib/ext/person.rb index dca6fe1..73dce04 100644 --- a/lib/ext/person.rb +++ b/lib/ext/person.rb @@ -5,4 +5,10 @@ class Person # TODO why this relationship doesn't exists in core? has_many :comments, :foreign_key => 'author_id' + def profile_completion_score_condition + self.points(category: 'profile_completion') == 0 and self.is_profile_complete? + end + def is_profile_complete? + true + end end -- libgit2 0.21.2