documentation model
This commit is contained in:
parent
32bf8715e1
commit
1e9e550428
|
@ -86,12 +86,15 @@ module CouchRest
|
||||||
self.class_database || CouchRest::Model.default_database
|
self.class_database || CouchRest::Model.default_database
|
||||||
end
|
end
|
||||||
|
|
||||||
# load a document from the database
|
# Load a document from the database by id
|
||||||
def get id
|
def get id
|
||||||
doc = database.get id
|
doc = database.get id
|
||||||
new(doc)
|
new(doc)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Load all documents that have the "couchrest-type" field equal to the
|
||||||
|
# name of the current class. Take thes the standard set of
|
||||||
|
# CouchRest::Database#view options.
|
||||||
def all opts = {}
|
def all opts = {}
|
||||||
self.generated_design_doc ||= default_design_doc
|
self.generated_design_doc ||= default_design_doc
|
||||||
unless design_doc_fresh
|
unless design_doc_fresh
|
||||||
|
|
Loading…
Reference in a new issue