Add administrators UserSegment
We need a user segment to have only administrators as recipients of both newsletters and notifications
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class UserSegments
|
||||
SEGMENTS = %w(all_users
|
||||
administrators
|
||||
proposal_authors
|
||||
investment_authors
|
||||
feasible_and_undecided_investment_authors
|
||||
@@ -10,6 +11,10 @@ class UserSegments
|
||||
User.active
|
||||
end
|
||||
|
||||
def self.administrators
|
||||
all_users.administrators
|
||||
end
|
||||
|
||||
def self.proposal_authors
|
||||
author_ids(Proposal.not_archived.not_retired.pluck(:author_id).uniq)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user