Commit 52793a4a authored by http://jneen.net/'s avatar http://jneen.net/

.notifiable_users: compact the passed-in users

parent 1b66c285
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment