def create_paginators_and_retrieve_collections #:nodoc:
Pagination::OPTIONS[self.class].each do |collection_id, options|
def create_paginators_and_retrieve_collections #:nodoc:
Pagination::OPTIONS[self.class].each do |collection_id, options|
# object, its +number+ attribute is used as the value; if the page does
# not belong to this Paginator, an ArgumentError is raised.
def current_page=(page)
# object, its +number+ attribute is used as the value; if the page does
# not belong to this Paginator, an ArgumentError is raised.
def current_page=(page)
@number = 1 unless @paginator.has_page_number? @number
end
attr_reader :paginator, :number
@number = 1 unless @paginator.has_page_number? @number
end
attr_reader :paginator, :number
# Find the beginning and end pages of the window
@first = if @paginator.has_page_number?(@page.number - @padding)
@paginator[@page.number - @padding]
# Find the beginning and end pages of the window
@first = if @paginator.has_page_number?(@page.number - @padding)
@paginator[@page.number - @padding]