summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-14 08:30:46 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-14 08:30:46 +0000
commit5c53dc5a1e7cbae3e7c281cfb0740d44c771958f (patch)
tree6a0b99b311097ba4525592e1663d63c643790d0e /app/models
parent352362adaff3217a8b5d727bc11faf2718423a26 (diff)
parent5f34759ecb630ef410fe1025cf19e37f1dd4615f (diff)
downloadgitlab-ce-5c53dc5a1e7cbae3e7c281cfb0740d44c771958f.tar.gz
Merge branch 'project-default-view' into 'master'
Allow user to specify content he wants to see on project page Improvement to !938. Since a lot of people complain on fact they don't like to see README. Especially since we already have a switcher for dashboard - it kind of acceptable to select behaviour. User can specify which content he/she wants to see: ![Screenshot_2015-07-13_18.24.31](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d237474e8f52df4a62ba7e951fa28bd8/Screenshot_2015-07-13_18.24.31.png) ![Screenshot_2015-07-13_18.24.36](https://gitlab.com/gitlab-org/gitlab-ce/uploads/473b0e2a94b3de16d048b8332b539816/Screenshot_2015-07-13_18.24.36.png) cc @JobV @jacobvosmaer @marin @sytses See merge request !970
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 317257a2500..fb330ff7185 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -177,6 +177,10 @@ class User < ActiveRecord::Base
# Note: When adding an option, it MUST go on the end of the array.
enum dashboard: [:projects, :stars]
+ # User's Project preference
+ # Note: When adding an option, it MUST go on the end of the array.
+ enum project_view: [:readme, :activity]
+
alias_attribute :private_token, :authentication_token
delegate :path, to: :namespace, allow_nil: true, prefix: true