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/contexts/filter_context.rb')
-rw-r--r--app/contexts/filter_context.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/contexts/filter_context.rb b/app/contexts/filter_context.rb
index 401d19b31c8..7349abb8d6e 100644
--- a/app/contexts/filter_context.rb
+++ b/app/contexts/filter_context.rb
@@ -12,7 +12,7 @@ class FilterContext
def apply_filter items
if params[:project_id]
- items = items.where(project_id: params[:project_id])
+ items = items.by_project(params[:project_id])
end
if params[:search].present?
@@ -20,12 +20,12 @@ class FilterContext
end
case params[:status]
- when 'closed'
- items.closed
- when 'all'
- items
- else
- items.opened
+ when 'closed'
+ items.closed
+ when 'all'
+ items
+ else
+ items.opened
end
end
end