VocabReminder
Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app

Active Admin Rails 5 undefined method per_page_kaminari

       

If you run into this error in development, using Rails 5 and Active Admin

NoMethodError - undefined method `per_page_kaminari'

Try the following.

First, make sure you have an initializer in your application.

# in config/initializers/kaminari.rb
Kaminari.configure do |config|
    config.page_method_name = :per_page_kaminari
end

If this doesn't do the trick, try adding the code to your application.rb file, at the bottom of the class.

module YourAppName
    class Application < Rails::Application
        Kaminari.configure do |config|
            config.page_method_name = :per_page_kaminari
        end

        # custom requires here
        require "#{Rails.root}/app/models/your-custom-require-file.rb"
    end
end
Tagged w/ #rails #activeadmin #kaminari