Module: Warped::Controllers::Pageable::Ui
- Extended by:
- ActiveSupport::Concern
- Includes:
- Warped::Controllers::Pageable
- Included in:
- Tabulatable::Ui
- Defined in:
- lib/warped/controllers/pageable/ui.rb
Instance Method Summary collapse
- #paginate ⇒ Object
-
#paginate_url_params(**options) ⇒ Hash
The paginate_url_params.
-
#paginated? ⇒ Boolean
Whether the current action is paginated.
- #pagination ⇒ Hash
Methods included from Warped::Controllers::Pageable
Instance Method Details
#paginate ⇒ Object
32 33 34 35 36 |
# File 'lib/warped/controllers/pageable/ui.rb', line 32 def paginate(...) @paginated = true super end |
#paginate_url_params(**options) ⇒ Hash
Returns The paginate_url_params.
18 19 20 21 |
# File 'lib/warped/controllers/pageable/ui.rb', line 18 def paginate_url_params(**) url_params = { page:, per_page: } url_params.merge!() end |
#paginated? ⇒ Boolean
Returns Whether the current action is paginated.
39 40 41 |
# File 'lib/warped/controllers/pageable/ui.rb', line 39 def paginated? @paginated ||= false end |
#pagination ⇒ Hash
25 26 27 28 29 |
# File 'lib/warped/controllers/pageable/ui.rb', line 25 def pagination super.tap do |hsh| hsh[:series] = series(hsh[:page], hsh[:total_pages]) end end |