.notifiable_users: compact the passed-in users
This commit is contained in:
parent
19309b9705
commit
8386d69f8f
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
module NotificationRecipientService
|
||||
def self.notifiable_users(users, *args)
|
||||
users.map { |u| NotificationRecipient.new(u, *args) }.select(&:notifiable?).map(&:user)
|
||||
users.compact.map { |u| NotificationRecipient.new(u, *args) }.select(&:notifiable?).map(&:user)
|
||||
end
|
||||
|
||||
def self.notifiable?(user, *args)
|
||||
|
|
Loading…
Reference in a new issue