Class: Railsboot::PaginationComponent
- Defined in:
- app/components/railsboot/pagination_component.rb
Constant Summary
Constants inherited from Component
Component::COLORS, Component::DEFAULT_COLOR
Instance Method Summary collapse
-
#initialize(pagy:) ⇒ PaginationComponent
constructor
A new instance of PaginationComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(pagy:) ⇒ PaginationComponent
Returns a new instance of PaginationComponent.
2 3 4 |
# File 'app/components/railsboot/pagination_component.rb', line 2 def initialize(pagy:) @pagy = pagy end |
Instance Method Details
#render? ⇒ Boolean
6 7 8 |
# File 'app/components/railsboot/pagination_component.rb', line 6 def render? @pagy.present? && @pagy.pages.to_i > 1 end |