Skip to content

Instantly share code, notes, and snippets.

@achiurizo
Created February 21, 2011 20:48
Show Gist options
  • Save achiurizo/837683 to your computer and use it in GitHub Desktop.
Save achiurizo/837683 to your computer and use it in GitHub Desktop.
Get will_paginate to work with AR on Padrino
# 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