Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/todos_finder.rb')
-rw-r--r--app/finders/todos_finder.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb
index 2b46e51290f..82acb5e9d45 100644
--- a/app/finders/todos_finder.rb
+++ b/app/finders/todos_finder.rb
@@ -188,11 +188,9 @@ class TodosFinder
end
def by_state(items)
- if params[:state].to_s == 'done'
- items.done
- else
- items.pending
- end
+ return items.pending if params[:state].blank?
+
+ items.with_states(params[:state])
end
def by_type(items)