class ActiveModelSerializers::Adapter::JsonApi::PaginationLinks

def pages_from

def pages_from
  return {} if collection.total_pages <= FIRST_PAGE
  {}.tap do |pages|
    pages[:self] = collection.current_page
    unless collection.current_page == FIRST_PAGE
      pages[:first] = FIRST_PAGE
      pages[:prev]  = collection.current_page - FIRST_PAGE
    end
    unless collection.current_page == collection.total_pages
      pages[:next] = collection.current_page + FIRST_PAGE
      pages[:last] = collection.total_pages
    end
  end
end