gitlab-org--gitlab-foss/app/controllers/groups/notification_settings_controller.rb
2016-04-11 20:50:26 -03:00

16 lines
434 B
Ruby

class Groups::NotificationSettingsController < Groups::ApplicationController
before_action :authenticate_user!
def update
notification_setting = current_user.notification_settings_for(group)
saved = notification_setting.update_attributes(notification_setting_params)
render json: { saved: saved }
end
private
def notification_setting_params
params.require(:notification_setting).permit(:level)
end
end