Kaminari adds the page method to ActiveRecord::Relation. Kaminari actually makes this method name configurable but WillFilter uses the 'page' method name and doesn't support a configuration option to change it. As a result, in applications using will_paginate, WillFilter::Filter#results blows up:
def results
@results ||= begin
...
if custom_conditions?
recs = process_custom_conditions(recs.all)
recs = Kaminari.paginate_array(recs)
end
recs = recs.page(page).per(per_page)
recs.wf_filter = self
recs
end
end
on the call to "per" as the will_paginate page method will have been called instead of the Kaminari one.
WillFilter should make the method name configurable the same way Kaminari daes.