Class: Uchi::Ui::Pagination::NextLink

Inherits:
Item
  • Object
show all
Defined in:
app/components/uchi/ui/pagination/next_link.rb

Instance Attribute Summary

Attributes inherited from Item

#page_number, #paginator

Instance Method Summary collapse

Methods inherited from Item

#initialize, #page_url

Constructor Details

This class inherits a constructor from Uchi::Ui::Pagination::Item

Instance Method Details

#next?Boolean

Returns true if there is a next page

Returns:

  • (Boolean)


8
9
10
# File 'app/components/uchi/ui/pagination/next_link.rb', line 8

def next?
  paginator.next.present?
end

#urlObject



12
13
14
15
16
17
18
# File 'app/components/uchi/ui/pagination/next_link.rb', line 12

def url
  if next?
    page_url(:next)
  else
    page_url(:last)
  end
end