diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-02-28 10:37:39 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2019-02-28 10:37:39 +0000 |
commit | 983173ce27fb91a824508f5e27f76748494435eb (patch) | |
tree | c85812cead7a2ce02d4b10d06fb66aab24a3cd96 /app/presenters | |
parent | 23eb41fc13469dc6d74bf216d283145416541ba5 (diff) | |
download | gitlab-ce-983173ce27fb91a824508f5e27f76748494435eb.tar.gz |
Fix bug where project topics truncate
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/project_presenter.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 4cac90c2567..000b7c433a2 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -315,6 +315,10 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated project.tag_list.take(MAX_TOPICS_TO_SHOW) # rubocop: disable CodeReuse/ActiveRecord end + def topics_not_shown + project.tag_list - topics_to_show + end + def count_of_extra_topics_not_shown if project.tag_list.count > MAX_TOPICS_TO_SHOW project.tag_list.count - MAX_TOPICS_TO_SHOW |