summaryrefslogtreecommitdiff
path: root/app/helpers/notifications_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-28 23:22:28 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-30 10:44:20 +0200
commit4ca73f56cb59b86f25b55ff02800571fb82c742f (patch)
tree6c2354e732e9efc95ef8138bc4cf3d0004557917 /app/helpers/notifications_helper.rb
parentb8f38437900cdddac9d19d5c48a2a8e5bb037f41 (diff)
downloadgitlab-ce-4ca73f56cb59b86f25b55ff02800571fb82c742f.tar.gz
Small refactoring and cleanup of notification logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/notifications_helper.rb')
-rw-r--r--app/helpers/notifications_helper.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb
index a0e91a63d2d..8816cc5d164 100644
--- a/app/helpers/notifications_helper.rb
+++ b/app/helpers/notifications_helper.rb
@@ -22,16 +22,12 @@ module NotificationsHelper
def notification_title(level)
case level.to_sym
- when :disabled
- 'Disabled'
when :participating
'Participate'
- when :watch
- 'Watch'
when :mention
'On mention'
- when :global
- 'Global'
+ else
+ level.to_s.titlecase
end
end
@@ -50,10 +46,6 @@ module NotificationsHelper
end
end
- def notification_label(setting)
- notification_title(setting.level)
- end
-
def active_level_for(setting, level)
'active' if setting.level == level
end