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:
parent
3e2b3ece46
commit
cf76466795
4 changed files with 159 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue