lib/zendesk_api/collection.rb
# Find the previous page. Does one of three things: 
# * If there is already a page number in the options hash, it increases it and invalidates the cache, returning the new page number.
# * If there is a prev_page url cached, it executes a fetch on that url and returns the results.
# * Otherwise, returns an empty array.
Find the previous page. Does one of three things:
If there is already a page number in the options hash, it increases it and invalidates the cache, returning the new page number.
If there is a prev_page url cached, it executes a fetch on that url and returns the results.
Otherwise, returns an empty array.
Find the previous page . Does one of three things : If there is already a page number in the options hash it increases it and invalidates the cache returning the new page number . If there is a prev_page url cached it executes a fetch on that url and returns the results . Otherwise returns an empty array .
def prev
      if @options["page"] && @options["page"] > 1 
        clear_cache
        @options["page"] -= 1
      elsif @prev_page
        @query = @prev_page
        fetch(true)
      else
        []
      end
    end
def prev if @options [ "page" ] && @options [ "page" ] > 1 clear_cache @options [ "page" ] -= 1 elsif @prev_page @query = @prev_page fetch ( true ) else [ ] end end
Find the previous page.
Find the previous page .