diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-09 14:20:32 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-09 14:20:32 +0300 |
commit | de36ca81d35992c265cd4fd09c774cb793dbd246 (patch) | |
tree | 3ad67701d063900418c1a9e1d8b577d699359af7 /app | |
parent | f22df3e9c1c590874cea8d50ab10f28467baaf18 (diff) | |
parent | 58dd4a095fc44a5ed015618a833e1fb806fdf457 (diff) |
Merge branch 'blackst0ne-rails5-fix-frozen-array' into 'master'
[Rails5] Fix `can't modify frozen Array` errors
See merge request gitlab-org/gitlab-ce!18239
Diffstat (limited to 'app')
-rw-r--r-- | app/services/notification_recipient_service.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/notification_recipient_service.rb b/app/services/notification_recipient_service.rb index e4be953e810..b82d9c64296 100644 --- a/app/services/notification_recipient_service.rb +++ b/app/services/notification_recipient_service.rb @@ -54,8 +54,7 @@ module NotificationRecipientService users = users.includes(:notification_settings) end - users = Array(users) - users.compact! + users = Array(users).compact recipients.concat(users.map { |u| make_recipient(u, type, reason) }) end |