Move pagination_max_id and pagination_since_id into api/base controller (#28844)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2024-03-13 08:51:44 +00:00
1 parent 01b624c4a0
commit 9754967d5f
23 files changed
+52 -132

No files matched your search

+8
View File
@@ -73,6 +73,14 @@ class Api::BaseController < ApplicationController
protected
def pagination_max_id
pagination_collection.last.id
end
def pagination_since_id
pagination_collection.first.id
end
def set_pagination_headers(next_path = nil, prev_path = nil)
links = []
links << [next_path, [%w(rel next)]] if next_path