deprecating DB#modify_in_db

This commit is contained in:
Mike Dirolf 2009-08-13 15:24:05 -04:00
parent 141974c012
commit a41a88d0f2
1 changed files with 5 additions and 2 deletions

View File

@ -364,8 +364,11 @@ module XGen
}
end
# Alias for #replace_in_db. Normally called by Collection.modify.
alias_method :modify_in_db, :replace_in_db
# DEPRECATED - use Collection#update instead
def modify_in_db(collection_name, selector, obj)
warn "DB#modify_in_db is deprecated and will be removed. Please use Collection#update instead."
replace_in_db(collection_name, selector, obj)
end
# Update records in +collection_name+ that match +selector+ by
# applying +obj+ as an update. If no match, inserts (???). Normally