diff options
Diffstat (limited to 'app/finders/todos_finder.rb')
-rw-r--r-- | app/finders/todos_finder.rb | 8 |
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) |