persisted? should be false after a document has been destroyed.

See https://github.com/rails/rails/blob/master/activemodel/CHANGELOG#L72
This commit is contained in:
Chase DuBois 2011-06-12 14:27:45 -04:00
parent 98772ae98a
commit b3a005b86d
3 changed files with 12 additions and 4 deletions

View file

@ -82,7 +82,7 @@ module CouchRest
end
def persisted?
!new?
!new? && !destroyed?
end
def to_key

View file

@ -44,7 +44,7 @@ module CouchRest::Model
alias :new_record? :new?
def persisted?
!new?
!new? && !destroyed?
end
# The to_param method is needed for rails to generate resourceful routes.