Class: Uchi::Ui::Pagination::PreviousLink
- Defined in:
- app/components/uchi/ui/pagination/previous_link.rb
Instance Attribute Summary
Attributes inherited from Item
Instance Method Summary collapse
-
#previous? ⇒ Boolean
Returns true if there is a previous page.
- #url ⇒ Object
Methods inherited from Item
Constructor Details
This class inherits a constructor from Uchi::Ui::Pagination::Item
Instance Method Details
#previous? ⇒ Boolean
Returns true if there is a previous page
8 9 10 |
# File 'app/components/uchi/ui/pagination/previous_link.rb', line 8 def previous? paginator.page > 1 end |
#url ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/components/uchi/ui/pagination/previous_link.rb', line 12 def url if previous? page_url(:previous) else page_url(:first) end end |