diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-22 13:57:11 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-22 13:59:15 -0300 |
commit | 3956bb552fe22feb0c5542e8cd9d06bb43be9650 (patch) | |
tree | b44b7c9311ab1ed6df00dd52fcff01e79dfbb252 /app/presenters | |
parent | 45c77dacbc7d9d71e6a32feb0640400bd266c357 (diff) | |
download | gitlab-ce-3956bb552fe22feb0c5542e8cd9d06bb43be9650.tar.gz |
Use select instead reject
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 9db4ef63fd7..484ac64580d 100644 --- a/app/presenters/project_presenter.rb +++ b/app/presenters/project_presenter.rb @@ -21,7 +21,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated gitlab_ci_anchor_data, autodevops_anchor_data(show_auto_devops_callout: show_auto_devops_callout), kubernetes_cluster_anchor_data - ].compact.reject { |item| !item.enabled } + ].compact.select { |item| item.enabled } end def statistics_buttons(show_auto_devops_callout:) @@ -40,7 +40,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated [ autodevops_anchor_data, kubernetes_cluster_anchor_data - ].compact.reject { |item| !item.enabled } + ].compact.select { |item| item.enabled } end def empty_repo_statistics_buttons |