After Updating Foreman from 1.15 to 1.17 , it is giving error while calling will_paginate_with_info method for pagination

I am developed my custom plugin in foreman, where i an using will_paginate_with_info method for pagination, in foreman version 1.15 was working fine but after updating it to 1.17 it is giving error " Oops, we’re sorry but something went wrong undefined method `total_entries’ for #<Array:0x000000000b8595c0>"

You will need to provide more information so we can help you, such as the full stack trace and/or the relevant code for the page that is failing to load.