Renamed new_document? and new_model? to simply new?
This commit is contained in:
parent
b4e2250668
commit
76b1563539
8 changed files with 26 additions and 26 deletions
|
@ -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}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue