SQLTerminal.app
now available

XPath.app
now available
Want fresh tech tips in your inbox?

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

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app