Module CouchRest::Mixins::Collection::ClassMethods
In: lib/couchrest/mixins/collection.rb

Methods

Public Instance methods

Create a CollectionProxy for the specified view and options. CollectionProxy behaves just like an Array, but offers support for pagination.

Fetch a group of objects from CouchDB. Options can include:

  :page - Specifies the page to load (starting at 1)
  :per_page - Specifies the number of objects to load per page

Defaults are used if these options are not specified.

Iterate over the objects in a collection, fetching them from CouchDB in groups. Options can include:

  :page - Specifies the page to load
  :per_page - Specifies the number of objects to load per page

Defaults are used if these options are not specified.

Creates a new class method, find_all_<collection_name>, that will execute the view specified with the design_doc and view_name parameters, along with the specified view_options. This method will return the results of the view as an Array of objects which are instances of the class.

This method is handy for objects that do not use the view_by method to declare their views.

[Validate]