correcting some class definitions of examples in README.md
This commit is contained in:
parent
d333133319
commit
cc2b183946
|
@ -177,14 +177,14 @@ documents and retrieve them using the CastedModel module. Simply include the mod
|
||||||
a Hash (or other model that responds to the [] and []= methods) and set any properties
|
a Hash (or other model that responds to the [] and []= methods) and set any properties
|
||||||
you'd like to use. For example:
|
you'd like to use. For example:
|
||||||
|
|
||||||
class CatToy << Hash
|
class CatToy < Hash
|
||||||
include CouchRest::Model::CastedModel
|
include CouchRest::Model::CastedModel
|
||||||
|
|
||||||
property :name, String
|
property :name, String
|
||||||
property :purchased, Date
|
property :purchased, Date
|
||||||
end
|
end
|
||||||
|
|
||||||
class Cat << CouchRest::Model::Base
|
class Cat < CouchRest::Model::Base
|
||||||
property :name, String
|
property :name, String
|
||||||
property :toys, [CatToy]
|
property :toys, [CatToy]
|
||||||
end
|
end
|
||||||
|
@ -203,7 +203,7 @@ Ruby will bring up a missing constant error. To avoid this, or if you have a rea
|
||||||
you'd like to model, the latest version of CouchRest Model (> 1.0.0) supports creating
|
you'd like to model, the latest version of CouchRest Model (> 1.0.0) supports creating
|
||||||
anonymous classes:
|
anonymous classes:
|
||||||
|
|
||||||
class Cat << CouchRest::Model::Base
|
class Cat < CouchRest::Model::Base
|
||||||
property :name, String
|
property :name, String
|
||||||
|
|
||||||
property :toys do |toy|
|
property :toys do |toy|
|
||||||
|
|
Loading…
Reference in a new issue