mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
remove 'page object' on paginations links'
This commit is contained in:
parent
f7c77c1256
commit
b864302695
@ -23,10 +23,9 @@ module ActiveModel
|
|||||||
end
|
end
|
||||||
|
|
||||||
def build_links(per_page)
|
def build_links(per_page)
|
||||||
pages = pages_from.each_with_object({}) do |(key, value), hash|
|
pages_from.each_with_object({}) do |(key, value), hash|
|
||||||
hash[key] = "?page=#{value}&per_page=#{per_page}"
|
hash[key] = "?page=#{value}&per_page=#{per_page}"
|
||||||
end
|
end
|
||||||
{ pages: pages } unless pages.empty?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pages_from
|
def pages_from
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user