Fixing issues with dirty tracking on nested models and related improvements

This commit is contained in:
Sam Lown 2011-04-20 16:44:49 +02:00
parent 8c4505d191
commit 2cc119b3b3
15 changed files with 141 additions and 115 deletions

View file

@ -18,8 +18,8 @@ module CouchRest
include CouchRest::Model::Associations
include CouchRest::Model::Validations
include CouchRest::Model::Designs
include CouchRest::Model::Dirty
include CouchRest::Model::CastedBy
include CouchRest::Model::Dirty
def self.subclasses
@subclasses ||= []
@ -74,14 +74,6 @@ module CouchRest
super
end
### instance methods
# Checks if we're the top document
# (overrides base_doc? in casted_by.rb)
def base_doc?
!@casted_by
end
## Compatibility with ActiveSupport and older frameworks
# Hack so that CouchRest::Document, which descends from Hash,