Question

If I have a JSON data source (ex: http://marketplace.envato.com/api/edge/new-files:themeforest,site-templates.json), can I use will_paginate for pagination? I use HTTParty for the JSON so it doesn't go through ActiveRecord, that's the problem. How can I use HTTParty together with will_paginate without ActiveRecord?

Was it helpful?

Solution

you can use will_paginate for array create array from json response just use
require 'will_paginate/array'
and

array.paginate(:page => 100, :per_page => 10)

Thank you

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top