Permalink
Browse files

Kaminari added a config option to customize the pagination method

to elminiate conflicts with will_paginate

Use that config option in the pagination method
  • Loading branch information...
1 parent a0d5828 commit 000e2a22cdf33be68cdfd0d5690b690e5e2ecaaa @j-manu j-manu committed Dec 22, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 activeadmin.gemspec
  2. +1 −1 lib/active_admin/resource_controller/collection.rb
View
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
s.add_dependency("devise", ">= 1.1.2")
s.add_dependency("formtastic", ">= 2.0.0")
s.add_dependency("inherited_resources", "< 1.3.0")
- s.add_dependency("kaminari", ">= 0.12.4")
+ s.add_dependency("kaminari", ">= 0.13.0")
s.add_dependency("sass", ">= 3.1.0")
s.add_dependency("fastercsv", ">= 0")
end
@@ -124,7 +124,7 @@ def setup_pagination_for_csv
end
def paginate(chain)
- chain.page(params[:page]).per(@per_page || active_admin_namespace.default_per_page)
+ chain.send(Kaminari.config.page_method_name, params[:page]).per(@per_page || active_admin_namespace.default_per_page)
end
end

0 comments on commit 000e2a2

Please sign in to comment.