Methods

DataMapper::Pagination::Helpers::Rails

Public Instance Methods

paginate(collection, options = {}) click to toggle source

Renders the pagination links for the given collection.

Options

:params  Hash of params that is passed to url_for
:size    Number of intermediate page number links to be shown; Defaults to 7
# File lib/dm-pager/helpers/rails.rb, line 12
def paginate collection, options = {}
  uri = @template.url_for @template.params.merge(options[:params] || {})
  collection.pager.to_html uri, options
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.