We are upgrading a rails app from v3 to v5 and are using ActiveAdmin which has a dependency on Kaminari. In this process we had to change all our models to inherit from ApplicationRecord
instead of ActiveRecord::Base
. This change results in the following errors:
undefined method `per_page_kaminari' for #Team::ActiveRecord_Relation:0x00555f215eb200
where Team
is a model that was previously inheriting from ActiveRecord::Base
and was changed to inherit from ApplicationRecord
. Any help to fix this would be much appreciated.
I have resolved this issue by placing the following code at the bottom of the
application.rb
file.