Use any? instead of count > 0, feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16832243
This commit is contained in:
Lin Jen-Shin 2016-10-13 01:12:00 +08:00
parent 94611607e5
commit f1e5ca3a31
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ class BuildsEmailService < Service
end
def can_test?
project.builds.count > 0
project.builds.any?
end
def disabled_title

View file

@ -39,7 +39,7 @@ class PipelinesEmailService < Service
end
def can_test?
project.pipelines.count > 0
project.pipelines.any?
end
def disabled_title