Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-04-11 16:23:40 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-04-11 16:23:40 +0300
commit73fdd4b83d76998fef9770dbeaf05981d4500b8c (patch)
tree3b92c0f99506795b356c74bfb6010211e71e607f /app/models/notification_setting.rb
parent99067a505ca62dc069189118d7d4c4e91de83917 (diff)
Use Hash instead of Array on NotificationSetting#level enum
Diffstat (limited to 'app/models/notification_setting.rb')
-rw-r--r--app/models/notification_setting.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb
index d89194b5a12..5001738f411 100644
--- a/app/models/notification_setting.rb
+++ b/app/models/notification_setting.rb
@@ -1,7 +1,5 @@
class NotificationSetting < ActiveRecord::Base
- # Notification level
- # Note: When adding an option, it MUST go on the end of the array.
- enum level: [:disabled, :participating, :watch, :global, :mention]
+ enum level: { disabled: 0, participating: 1, watch: 2, global: 3, mention: 4 }
default_value_for :level, NotificationSetting.levels[:global]