Module: WillPaginate::SequelMethods

### Home Classes Methods

### In Files

- lib/will_paginate/sequel.rb

### Methods

- #length
- #offset
- #out_of_bounds?
- #per_page
- #size
- #total_entries
- #total_pages

### Included Modules

- WillPaginate::CollectionMethods

### Class/Module Index

Quicksearch

- WillPaginate
- WillPaginate::ActionView
- WillPaginate::ActionView::LinkRenderer
- WillPaginate::ActiveRecord
- WillPaginate::ActiveRecord::BaseMethods
- WillPaginate::ActiveRecord::Pagination
- WillPaginate::ActiveRecord::RelationMethods
- WillPaginate::Collection
- WillPaginate::CollectionMethods
- WillPaginate::DataMapper
- WillPaginate::DataMapper::CollectionMethods
- WillPaginate::DataMapper::Pagination
- WillPaginate::Deprecation
- WillPaginate::Deprecation::Hash
- WillPaginate::I18n
- WillPaginate::InvalidPage
- WillPaginate::Merb
- WillPaginate::Merb::LinkRenderer
- WillPaginate::PageNumber
- WillPaginate::PerPage
- WillPaginate::PerPage::Inheritance
- WillPaginate::Railtie
- WillPaginate::Railtie::ControllerRescuePatch
- WillPaginate::Railtie::ShowExceptionsPatch
- WillPaginate::SequelMethods
- WillPaginate::Sinatra
- WillPaginate::Sinatra::Helpers
- WillPaginate::Sinatra::LinkRenderer
- WillPaginate::ViewHelpers
- WillPaginate::ViewHelpers::LinkRenderer
- WillPaginate::ViewHelpers::LinkRendererBase
- Array
- Object

No matching classes.

# WillPaginate::SequelMethods

Sequel already supports pagination; we only need to make the resulting dataset look a bit more like WillPaginate::Collection

### Public Instance Methods

length() click to toggle source
Alias for: size
offset() click to toggle source

Current offset of the paginated collection

    # File lib/will_paginate/sequel.rb, line 33
    def offset
      (current_page - 1) * per_page
    end

out_of_bounds?() click to toggle source

    # File lib/will_paginate/sequel.rb, line 28
    def out_of_bounds?
      current_page > total_pages
    end

per_page() click to toggle source

    # File lib/will_paginate/sequel.rb, line 15
    def per_page
      page_size
    end

size() click to toggle source

    # File lib/will_paginate/sequel.rb, line 19
    def size
      current_page_record_count
    end

Also aliased as: length
total_entries() click to toggle source

    # File lib/will_paginate/sequel.rb, line 24
    def total_entries
      pagination_record_count
    end

total_pages() click to toggle source

    # File lib/will_paginate/sequel.rb, line 11
    def total_pages
      page_count
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.