Permalink
Browse files

Add monkey patch to fix WillPaginate vs Kaminari

  • Loading branch information...
1 parent bf1c178 commit 62c2ed27a4f1ad5878c0a363f18a9aa972050cab @amacneil committed Aug 30, 2012
Showing with 12 additions and 0 deletions.
  1. +2 −0 README.md
  2. +10 −0 config/initializers/will_paginate.rb
View
@@ -16,3 +16,5 @@ Install Spree
Update routes.rb
mount Spree::Core::Engine, :at => '/spree'
+
+Add WillPaginate initializer monkey patch
@@ -0,0 +1,10 @@
+if defined?(WillPaginate)
+ module WillPaginate
+ module ActiveRecord
+ module RelationMethods
+ alias_method :per, :per_page
+ alias_method :num_pages, :total_pages
+ end
+ end
+ end
+end

0 comments on commit 62c2ed2

Please sign in to comment.