I have an array @level1 which looks like this :
[[3.0, 4, 2], [2.0, 48, 3], [2.1, 56, 4], ............]
I want to apply pagination on this
Given a collection array in a Rails project
collection
will_paginate ~>3.0.5 collection.paginate(page: params[:page], per_page: 10)
returns the pagination for the array values.
Do not forget require 'will_paginate/array' on top of the controller.
require 'will_paginate/array'