Commit 8386d69f authored by http://jneen.net/'s avatar http://jneen.net/

.notifiable_users: compact the passed-in users

parent 19309b97
......@@ -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