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:
authorDouwe Maan <douwe@selenight.nl>2017-05-18 20:56:02 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-19 11:11:53 +0300
commit3496476205a7361a39e714eb9df7ad321b525ea2 (patch)
tree994154f81ad40a7f9477ad3f94cd4d0b6e1f6211 /app/models
parent01a7f333026ab7031122075d1c797423005ca56b (diff)
Remove readme project_view option
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index d63641891fd..837ab78228b 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -166,8 +166,13 @@ class User < ActiveRecord::Base
enum dashboard: [:projects, :stars, :project_activity, :starred_project_activity, :groups, :todos]
# User's Project preference
- # Note: When adding an option, it MUST go on the end of the array.
- enum project_view: [:readme, :activity, :files]
+ #
+ # Note: When adding an option, it MUST go on the end of the hash with a
+ # number higher than the current max. We cannot move options and/or change
+ # their numbers.
+ #
+ # We skip 0 because this was used by an option that has since been removed.
+ enum project_view: { activity: 1, files: 2 }
alias_attribute :private_token, :authentication_token