Added Collection mixin.

The Collection mixin adds support for executing a view, and passing
back the view results as an Array of the given ExtendedDocument instance.
It also supports will_paginate like pagination methods (paginate, paginated_each),
which will only fetch the given set of documents from CouchDB.
This commit is contained in:
John Wood 2009-06-04 13:43:14 -05:00 committed by Matt Aimonetti
parent 3e2b3ece46
commit cf76466795
4 changed files with 159 additions and 4 deletions

View file

@ -13,10 +13,11 @@ module CouchRest
include CouchRest::Mixins::DesignDoc
include CouchRest::Mixins::ExtendedAttachments
include CouchRest::Mixins::ClassProxy
include CouchRest::Mixins::Collection
def self.subclasses
@subclasses ||= []
end
def self.subclasses
@subclasses ||= []
end
def self.inherited(subklass)
subklass.send(:include, CouchRest::Mixins::Properties)