Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @dataset = WillPaginate::Collection.create(1, per_page) do |pager|
- links = DB[sql_pop].limit(per_page, (@page.to_i-1)*pager.per_page).all
- pager.replace(links)
- unless pager.total_entries
- pager.total_entries = links.count
- end
- end
Add Comment
Please, Sign In to add comment