Module: DataMapper::Pagination::Helpers::Rails
- Defined in:
- lib/dm-pager/helpers/rails.rb
Instance Method Summary collapse
-
#paginate(collection, options = {}) ⇒ Object
Renders the pagination links for the given collection.
Instance Method Details
#paginate(collection, options = {}) ⇒ Object
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
12 13 14 15 |
# File 'lib/dm-pager/helpers/rails.rb', line 12 def paginate collection, = {} uri = @template.url_for @template.params.merge([:params] || {}) collection.pager.to_html uri, end |