dirs (owner)

Revisions

gist: 227404 Download_button fork
public
Public Clone URL: git://gist.github.com/227404.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
    @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