From df834306c1794ed72d6d655c7941dee28f7e85c7 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 1 Mar 2017 02:34:48 +0900 Subject: Add specs. Plus, minor fixes. --- app/finders/pipelines_finder.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/finders/pipelines_finder.rb') diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb index c2e247a7ded..ff16d7305ad 100644 --- a/app/finders/pipelines_finder.rb +++ b/app/finders/pipelines_finder.rb @@ -88,8 +88,12 @@ class PipelinesFinder end def by_yaml_errors(items) - if params[:yaml_errors].present? && params[:yaml_errors] - items.where("yaml_errors IS NOT NULL") + if params[:yaml_errors].present? + if params[:yaml_errors] + items.where("yaml_errors IS NOT NULL") + else + items.where("yaml_errors IS NULL") + end else items end -- cgit v1.2.1