Get kaminari pagination links in the JSON generated by the active model serializer
问题 I am trying to convert @admins to JSON using the AdminSerializer #app/serializers/admin_serializer.rb class AdminSerializer < ActiveModel::Serializer attributes :id, :email, :access_locked? end where Admins is>> @admins = @search.result(:distinct => true).page(params[:page][:number]).per(10) and @search = Admin.search(params[:q]) When I execute this command>> ActiveModel::SerializableResource.new(@admins.to_a).as_json I do get the desired JSON, but the pagination links are missing from the