.notifiable_users: compact the passed-in users

This commit is contained in:
http://jneen.net/ 2017-08-01 12:51:14 -07:00
parent 19309b9705
commit 8386d69f8f

View file

@ -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)