From ee59172e253a9cb4121c1346fdbb4e995df6454c Mon Sep 17 00:00:00 2001 From: Emily Stolfo Date: Wed, 26 Nov 2014 10:43:54 +0100 Subject: [PATCH] RUBY-837 Update create_collection and create_index opts documentation --- lib/mongo/collection.rb | 4 ++++ lib/mongo/db.rb | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/mongo/collection.rb b/lib/mongo/collection.rb index fab5d0043d..cb86927930 100644 --- a/lib/mongo/collection.rb +++ b/lib/mongo/collection.rb @@ -550,6 +550,8 @@ def update(selector, document, opts={}) # The option is silently ignored by the server and unique index builds using the option will # fail if a duplicate value is detected. # + # @note See the MongoDB documentation for a full list of supported options by server version. + # # @return [String] the name of the index created. def create_index(spec, opts={}) options = opts.dup @@ -581,6 +583,8 @@ def create_index(spec, opts={}) # The option is silently ignored by the server and unique index builds using the option will # fail if a duplicate value is detected. # + # @note See the MongoDB documentation for a full list of supported options by server version. + # # @return [String] the name of the index. def ensure_index(spec, opts={}) now = Time.now.utc.to_i diff --git a/lib/mongo/db.rb b/lib/mongo/db.rb index 3ecdb477f7..7e0f9a1688 100644 --- a/lib/mongo/db.rb +++ b/lib/mongo/db.rb @@ -316,6 +316,8 @@ def collections_info(coll_name=nil) # either we're in +strict+ mode and the collection # already exists or collection creation fails on the server. # + # @note See the MongoDB documentation for a full list of supported options by server version. + # # @return [Mongo::Collection] def create_collection(name, opts={}) name = name.to_s