summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-29 14:03:23 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-30 10:44:20 +0200
commitf8f68d6b8c5b5d85b4798257ae3ae4bf4ec8fadc (patch)
treefe85fbe85b13688a49ce4b5b5e716c5c26b13b18
parent71e7b398431506c8bac2e8e6014b0f3891a41f95 (diff)
downloadgitlab-ce-f8f68d6b8c5b5d85b4798257ae3ae4bf4ec8fadc.tar.gz
Fix few bugs related to recent notifications refactoring
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/controllers/profiles/notifications_controller.rb1
-rw-r--r--app/models/member.rb2
2 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/profiles/notifications_controller.rb b/app/controllers/profiles/notifications_controller.rb
index 6ca7537300f..0cca5d1e330 100644
--- a/app/controllers/profiles/notifications_controller.rb
+++ b/app/controllers/profiles/notifications_controller.rb
@@ -1,7 +1,6 @@
class Profiles::NotificationsController < Profiles::ApplicationController
def show
@user = current_user
- @notification = current_user.notification
@group_notifications = current_user.notification_settings.for_groups
@project_notifications = current_user.notification_settings.for_projects
end
diff --git a/app/models/member.rb b/app/models/member.rb
index 747d0f16d8d..7d5af1d5c8a 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -163,7 +163,7 @@ class Member < ActiveRecord::Base
end
def create_notification_setting
- user.notification_setting.find_or_create_for(source)
+ user.notification_settings.find_or_create_for(source)
end
def notification_setting