How to fix error when using will_paginate with rails_admin kaminari on Ruby on Rails

 1. Create config/initializers/will_paginate_kaminari_evteihen_baigaarai.rb

if defined?(WillPaginate)
  module WillPaginate
    module ActiveRecord
      module RelationMethods
        def per(value = nil) per_page(value) end
        def total_count() count end
      end
    end
    module CollectionMethods
      alias_method :num_pages, :total_pages
    end
  end
end

2. That's it

Comments