Module: PaginationHelper
- Defined in:
- lib/ecrire/app/helpers/pagination_helper.rb
Overview
This module overloads the paginate
method defined by Kaminari to force kaminari to use the routes provided by the theme.
This might not be needed when Kaminari reaches 1.0 per github.com/amatsuda/kaminari/pull/636
Instance Method Summary collapse
-
#paginate(scope, options = {}, &block) ⇒ Object
Returns pagination for the given scope(record).
Instance Method Details
#paginate(scope, options = {}, &block) ⇒ Object
Returns pagination for the given scope(record).
The argument list is the same as the one declared by kaminari to keep the expected behavior when calling “‘super“`
Example:
“‘ erb <%= paginate(@posts) %> “`
21 22 23 24 25 |
# File 'lib/ecrire/app/helpers/pagination_helper.rb', line 21 def paginate(scope, = {}, &block) _with_routes Ecrire::Theme::Engine.routes do super end end |