summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/groups_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/groups_controller.rb')
-rw-r--r--app/controllers/profiles/groups_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/profiles/groups_controller.rb b/app/controllers/profiles/groups_controller.rb
index c755bcb718a..04b5ee270dc 100644
--- a/app/controllers/profiles/groups_controller.rb
+++ b/app/controllers/profiles/groups_controller.rb
@@ -5,7 +5,7 @@ class Profiles::GroupsController < Profiles::ApplicationController
def update
group = find_routable!(Group, params[:id])
- notification_setting = current_user.notification_settings.find_by(source: group) # rubocop: disable CodeReuse/ActiveRecord
+ notification_setting = current_user.notification_settings_for(group)
if notification_setting.update(update_params)
flash[:notice] = "Notification settings for #{group.name} saved"