Extract method to get stats participant_ids
This way we can share the `participants` method between budget and poll stats.
This commit is contained in:
@@ -33,6 +33,10 @@ module Statisticable
|
||||
participants.where(geozone: geozones).any?
|
||||
end
|
||||
|
||||
def participants
|
||||
User.where(id: participant_ids)
|
||||
end
|
||||
|
||||
def total_male_participants
|
||||
participants.male.count
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user