diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-04-11 18:23:12 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-04-11 20:50:26 -0300 |
commit | 93a10f17e0c84074580eaf1b101af2a0fffd19ed (patch) | |
tree | cf601b69b92f4db61a0b41daf6e7a0742a0a0070 /app/controllers/groups | |
parent | 9a44d6977ad27a443538b2b6c34b3fdd722e9bd6 (diff) | |
download | gitlab-ce-93a10f17e0c84074580eaf1b101af2a0fffd19ed.tar.gz |
Reuse `User#notification_settings_for` when it's possible
Diffstat (limited to 'app/controllers/groups')
-rw-r--r-- | app/controllers/groups/notification_settings_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/groups/notification_settings_controller.rb b/app/controllers/groups/notification_settings_controller.rb index 20405a05190..1b46f26a378 100644 --- a/app/controllers/groups/notification_settings_controller.rb +++ b/app/controllers/groups/notification_settings_controller.rb @@ -1,6 +1,6 @@ class Groups::NotificationSettingsController < Groups::ApplicationController def update - notification_setting = group.notification_settings.find_by(user_id: current_user) + notification_setting = current_user.notification_settings_for(group) saved = notification_setting.update_attributes(notification_setting_params) render json: { saved: saved } |