| Class | CouchRest::Model::Base |
| In: |
lib/couchrest/model/base.rb
|
| Parent: | CouchRest::Document |
| new? | -> | new_record? |
| new? | -> | new_document? |
Instantiate a new CouchRest::Model::Base by preparing all properties using the provided document hash.
Options supported:
If a block is provided the new model will be passed into the block so that it can be populated.
Compare this model with another by confirming to see if the IDs and their databases match!
Camparison of the database is required in case the model has been proxied or loaded elsewhere.
A Basic CouchRest document will only ever compare using a Hash comparison on the attributes.