Module DataMapper::Pagination::Helpers::Rails
In: lib/dm-pager/helpers/rails.rb
lib/dm-pager/helpers/rails.rb

Methods

paginate   paginate  

Public Instance methods

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

[Source]

    # File lib/dm-pager/helpers/rails.rb, line 12
12:   def paginate collection, options = {}
13:     uri = @template.url_for @template.params.merge(options[:params] || {})
14:     collection.pager.to_html uri, options
15:   end

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

[Source]

    # File lib/dm-pager/helpers/rails.rb, line 12
12:   def paginate collection, options = {}
13:     uri = @template.url_for @template.params.merge(options[:params] || {})
14:     collection.pager.to_html uri, options
15:   end

[Validate]