diff options
author | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
---|---|---|
committer | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
commit | a8e93b7f51d968c1380ed210499869b62b07fd15 (patch) | |
tree | c864e80dfd9cf4f83fcede678acc986e3a125bf5 /app/controllers/profiles/notifications_controller.rb | |
parent | 0625b15a481b3a3edd88110b3c18031ad9068d2f (diff) |
Version 7.10.0.rc5v7.10.0.rc5
Diffstat (limited to 'app/controllers/profiles/notifications_controller.rb')
-rw-r--r-- | app/controllers/profiles/notifications_controller.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/app/controllers/profiles/notifications_controller.rb b/app/controllers/profiles/notifications_controller.rb deleted file mode 100644 index 3fdcbbab61b..00000000000 --- a/app/controllers/profiles/notifications_controller.rb +++ /dev/null @@ -1,44 +0,0 @@ -class Profiles::NotificationsController < ApplicationController - layout 'profile' - - def show - @user = current_user - @notification = current_user.notification - @project_members = current_user.project_members - @group_members = current_user.group_members - end - - def update - type = params[:notification_type] - - @saved = if type == 'global' - current_user.update_attributes(user_params) - elsif type == 'group' - group_member = current_user.group_members.find(params[:notification_id]) - group_member.notification_level = params[:notification_level] - group_member.save - else - project_member = current_user.project_members.find(params[:notification_id]) - project_member.notification_level = params[:notification_level] - project_member.save - end - - respond_to do |format| - format.html do - if @saved - flash[:notice] = "Notification settings saved" - else - flash[:alert] = "Failed to save new settings" - end - - redirect_to :back - end - - format.js - end - end - - def user_params - params.require(:user).permit(:notification_email, :notification_level) - end -end |