use a simple pluck, since equivalent filtering happens later

This commit is contained in:
http://jneen.net/ 2017-07-31 17:09:01 -07:00
parent 18288fe21e
commit 3c56e41402
1 changed files with 1 additions and 3 deletions

View File

@ -175,9 +175,7 @@ module NotificationRecipientService
end
def user_ids_with_global_level_custom(ids, action)
settings = settings_with_global_level_of(:custom, ids)
settings = settings.select { |setting| setting.event_enabled?(action) }
settings.map(&:user_id)
settings_with_global_level_of(:custom, ids).pluck(:user_id)
end
def settings_with_global_level_of(level, ids)