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/error_tracking/errors_finder.rb')
-rw-r--r--app/finders/error_tracking/errors_finder.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/finders/error_tracking/errors_finder.rb b/app/finders/error_tracking/errors_finder.rb
index d83a0c487e6..c361d6e2fc2 100644
--- a/app/finders/error_tracking/errors_finder.rb
+++ b/app/finders/error_tracking/errors_finder.rb
@@ -15,8 +15,7 @@ module ErrorTracking
collection = by_status(collection)
collection = sort(collection)
- # Limit collection until pagination implemented.
- limit(collection)
+ collection.keyset_paginate(cursor: params[:cursor], per_page: limit)
end
private
@@ -39,9 +38,9 @@ module ErrorTracking
params[:sort] ? collection.sort_by_attribute(params[:sort]) : collection.order_id_desc
end
- def limit(collection)
+ def limit
# Restrict the maximum limit at 100 records.
- collection.limit([(params[:limit] || 20).to_i, 100].min)
+ [(params[:limit] || 20).to_i, 100].min
end
end
end