Started on the ExtendedDocument class with features moved to mixins.
Properties got added, they define getters, setters and aliases. They will also be the base of the new validation system.
This commit is contained in:
parent
83d7341553
commit
d64fa45cf0
2 changed files with 9 additions and 3 deletions
|
@ -35,6 +35,12 @@ module CouchRest
|
|||
first_instance.empty? ? nil : first_instance.first
|
||||
end
|
||||
|
||||
# Load a document from the database by id
|
||||
def get(id)
|
||||
doc = database.get id
|
||||
new(doc)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue