Commit 4ba4668b authored by Ohad Dahan's avatar Ohad Dahan

Added load on @project_notifications since `size` comes before `each`

parent 6f3e227c
......@@ -10,7 +10,7 @@ class Profiles::NotificationsController < Profiles::ApplicationController
all_available: false,
exclude_group_ids: @group_notifications.select(:source_id)
).execute.map { |group| current_user.notification_settings_for(group, inherit: true) }
@project_notifications = current_user.notification_settings.for_projects.order(:id)
@project_notifications = current_user.notification_settings.for_projects.order(:id).load
@global_notification_setting = current_user.global_notification_setting
end
# rubocop: enable CodeReuse/ActiveRecord
......
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