summaryrefslogtreecommitdiff
path: root/app/helpers/preferences_helper.rb
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-11-08 17:43:19 +0000
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-11-11 22:17:56 +0000
commit0527ea09920d49bb9e1574e7a61958ba70dbe24e (patch)
tree89b8d48e4f03ffee34de6cef11009ce3960ebbda /app/helpers/preferences_helper.rb
parent6eeff67c6e03233d4480a55d05d4e0f1a88aef4c (diff)
downloadgitlab-ce-0527ea09920d49bb9e1574e7a61958ba70dbe24e.tar.gz
adds guard clause for readme model method and initializes a new view with proper stylesheets
Diffstat (limited to 'app/helpers/preferences_helper.rb')
-rw-r--r--app/helpers/preferences_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb
index a46f2c6e17d..a721f8957cb 100644
--- a/app/helpers/preferences_helper.rb
+++ b/app/helpers/preferences_helper.rb
@@ -50,7 +50,9 @@ module PreferencesHelper
end
def default_project_view
- return 'readme' unless current_user
+ unless current_user
+ return @repository.head_commit ? 'readme' : 'activity'
+ end
user_view = current_user.project_view