diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-21 16:47:13 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-21 17:58:42 +0300 |
commit | 082a32350a2913a73f2ee2e811d3bdb78e62f33e (patch) | |
tree | 353d7b485cbf4f364437db4ed7b9e282ca03503f /app/presenters | |
parent | 70156f3b8e277ffeba2a6c37d15ec2669fb432d7 (diff) |
Use method call instead hash accesses
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/project_presenter.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb index 843651682eb..d193a182da3 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 { |i| !i[:enabled] } + ].compact.reject { |item| !item.enabled? } end def statistics_buttons(show_auto_devops_callout:) @@ -33,14 +33,14 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated kubernetes_cluster_anchor_data, gitlab_ci_anchor_data, koding_anchor_data - ].compact.reject { |i| i[:enabled] } + ].compact.reject { |item| item.enabled? } end def empty_repo_statistics_anchors [ autodevops_anchor_data, kubernetes_cluster_anchor_data - ].compact.reject { |i| !i[:enabled] } + ].compact.reject { |item| !item.enabled? } end def empty_repo_statistics_buttons @@ -50,7 +50,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated license_anchor_data, autodevops_anchor_data, kubernetes_cluster_anchor_data - ].compact.reject { |i| i[:enabled] } + ].compact.reject { |item| item.enabled? } end def default_view |