Created
February 21, 2011 20:48
-
-
Save achiurizo/837683 to your computer and use it in GitHub Desktop.
Get will_paginate to work with AR on Padrino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In your gemfile, add will_paginate. | |
# We are using the latest ActiveRecord(3.0.x) | |
# As of this gist, the version for will_paginate is 2.3.15, we want 3.x version | |
## Gemfile | |
gem 'will_paginate', '3.0.pre2' | |
# In config/boot.rb, enable activerecord in Padrino.after_load. | |
## config/boot.rb | |
# ... | |
Padrino.after_load do | |
require 'will_paginate/finders/active_record' | |
WillPaginate::Finders::ActiveRecord.enable! | |
end | |
# ... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment