Skip to content

Rails 5 fix product array method delagation by manually calling .to_a in NotificationService

What does this MR do?

Fix NotificationService for Rails 5. In Rails 5 blanket array delegation was removed, so recipients.product(alerts) fails because product is not in the explicitly delegated methods of Rails. An explicit .to_a gives the same result.

spec that was failing: ee/spec/services/ee/notification_service_spec.rb:254 see https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/85910127

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

rails5 upgrade

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports