summaryrefslogtreecommitdiff
path: root/config/initializers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-17 10:07:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-17 10:07:47 +0000
commitd670c3006e6e44901bce0d53cc4768d1d80ffa92 (patch)
tree8f65743c232e5b76850c4cc264ba15e1185815ff /config/initializers
parenta5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (diff)
downloadgitlab-ce-d670c3006e6e44901bce0d53cc4768d1d80ffa92.tar.gz
Add latest changes from gitlab-org/gitlab@14-0-stable-ee
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/active_record_keyset_pagination.rb4
-rw-r--r--config/initializers/declarative_policy.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/config/initializers/active_record_keyset_pagination.rb b/config/initializers/active_record_keyset_pagination.rb
index f8c2ada5255..f5692c95276 100644
--- a/config/initializers/active_record_keyset_pagination.rb
+++ b/config/initializers/active_record_keyset_pagination.rb
@@ -2,8 +2,8 @@
module PaginatorExtension
# This method loads the records for the requested page and returns a keyset paginator object.
- def keyset_paginate(cursor: nil, per_page: 20)
- Gitlab::Pagination::Keyset::Paginator.new(scope: self.dup, cursor: cursor, per_page: per_page)
+ def keyset_paginate(cursor: nil, per_page: 20, keyset_order_options: {})
+ Gitlab::Pagination::Keyset::Paginator.new(scope: self.dup, cursor: cursor, per_page: per_page, keyset_order_options: keyset_order_options)
end
end
diff --git a/config/initializers/declarative_policy.rb b/config/initializers/declarative_policy.rb
index 49267584809..406f88bac23 100644
--- a/config/initializers/declarative_policy.rb
+++ b/config/initializers/declarative_policy.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require 'declarative_policy'
+
DeclarativePolicy.configure do
named_policy :global, ::GlobalPolicy
end