Method: ActiveResource::PaginatedCollection#next_page

Defined in:
lib/esp/extensions/active_resource/paginated_collection.rb

#next_pagePaginatedCollection, self

Returns the next page of results.

Returns self (and no API call is made) when already on the last page.

Examples:

alerts.current_page_number # => 5
next_page = alerts.next_page
alerts.current_page_number # => 5
next_page.current_page_number # => 6

Returns:



85
86
87
# File 'lib/esp/extensions/active_resource/paginated_collection.rb', line 85

def next_page
  next_page? ? updated_collection(next_page_params.merge(from: from)) : self
end