Commit 3956bb55 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Use select instead reject

parent 45c77dac
...@@ -21,7 +21,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ...@@ -21,7 +21,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
gitlab_ci_anchor_data, gitlab_ci_anchor_data,
autodevops_anchor_data(show_auto_devops_callout: show_auto_devops_callout), autodevops_anchor_data(show_auto_devops_callout: show_auto_devops_callout),
kubernetes_cluster_anchor_data kubernetes_cluster_anchor_data
].compact.reject { |item| !item.enabled } ].compact.select { |item| item.enabled }
end end
def statistics_buttons(show_auto_devops_callout:) def statistics_buttons(show_auto_devops_callout:)
...@@ -40,7 +40,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ...@@ -40,7 +40,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
[ [
autodevops_anchor_data, autodevops_anchor_data,
kubernetes_cluster_anchor_data kubernetes_cluster_anchor_data
].compact.reject { |item| !item.enabled } ].compact.select { |item| item.enabled }
end end
def empty_repo_statistics_buttons def empty_repo_statistics_buttons
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment