Renamed new_document? and new_model? to simply new?

This commit is contained in:
Peter Gumeson 2009-06-04 20:44:44 -07:00
parent b4e2250668
commit 76b1563539
8 changed files with 26 additions and 26 deletions

View file

@ -27,7 +27,7 @@ module CouchRest
end
# returns true if the document has never been saved
def new_document?
def new?
!rev
end
@ -67,7 +67,7 @@ module CouchRest
# Returns the CouchDB uri for the document
def uri(append_rev = false)
return nil if new_document?
return nil if new?
couch_uri = "http://#{database.uri}/#{CGI.escape(id)}"
if append_rev == true
couch_uri << "?rev=#{rev}"