Im building a web application in rails to fetch records from a third party API. This third party API accepts `page` parameter. For eg: `GET http://thirdpartyapi.com/records?page=2`

How can I build my html in paginated format, so that when user clicks on number 2, it should send `page=2` and when user clicks on number 4, it should send `page=4` in the requests. Is there any gem for that?

```
class DemoController < ApplicationController
  def index
    response = HTTP.get('http://thirdparty.com/records', {query: {page: params[:page]}}) # it will return 30 items by default
    @items = response['items'].paginate(page: params[:page], per_page: 10)
  end
end

```

This is my views

```
<%= will_paginate %>

```