在 Rails 上 Ruby 中通过 Jbuilder 构建 JSON 后,大小超过 100 的单个数组变为多个数组

Single array with size more than 100 becomes multiple array after building JSON through Jbuilder in Ruby on Rails

我有一个 table,它有超过 100 条记录,当我尝试使用 where 方法检索记录时,我得到一个长度超过 100 的数组。

但是在构建 JSON 并且到达前端时,我得到了两个数组而不是一个。一个数组大小为 100,另一个数组包含其余元素。是因为 jbuilder 还是 JSON 有特定的限制?

在控制器中

def index

    @screen_seat_type = ScreenSeatType.find_by screen_id: params[:screen_id], seat_type_id: params[:seat_type_id]
    @seats = Seat.where( :screen_seat_type_id => @screen_seat_type.id ).order(:name)

  end

在index.json.jbuilder

json.seats @seats do |seat|
    json.id seat.id
    json.name seat.name
    json.row_name seat.row_name
    json.is_open seat.is_open
end

我正在使用 Rails API + ReactJS。

在网络日志中,您会看到两个数组,因为它会截断任何巨大的数组,任何人都想查看整个数组,然后他可以扩展那个数组。实际上它只是一个数组而不是两个