diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-20 19:30:49 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-20 21:25:46 +0300 |
commit | c445ef539ef62b0eb425b8cf60e240597b697ec1 (patch) | |
tree | 37c5614c11dc9f76bf4ff483e9cb4d7c12e167b5 /app/presenters | |
parent | e0e3f1c2750b6db9343d530d00b096bcb1a57677 (diff) |
Move default_project_view tests to presenter
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/project_presenter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index c76a529f56b..1f37830e181 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -52,7 +52,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ].compact.reject { |i| i[:enabled] } end - def default_project_view + def default_view return anonymous_project_view unless current_user user_view = current_user.project_view @@ -242,7 +242,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated { enabled: true, label: _('Readme'), - link: default_project_view != 'readme' ? readme_path : '#readme' + link: default_view != 'readme' ? readme_path : '#readme' } end end |