Module | Ramaze::Helper::Pager
In: | lib/ramaze/helper/pager.rb

Pager related helper methods.

### Methods

paginate

### Public Instance methods

paginate(items, options = {})

Helper method that generates a collection of items and the associated pager object.

### Example

items = [ ‘item1’, ‘item2’, … ] entries, pager = paginate(items, :limit => 10)

<ul> <?r for entry in entries ?>

       <li>#{entry.to_link}</li>

<?r end ?> </ul> #{pager.navigation}

### Og Example

entries, pager = paginate(Article, :where => ‘title LIKE..’, :limit => 10)

or

entries, pager = paginate(article.comments, :limit => 10)

[Validate]