-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: drivers
-
Labels:
-
Environment:
*Location*: https://docs.mongodb.com/ruby-driver/master/tutorials/ruby-driver-projections/
*User-Agent*: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116 Safari/537.36
*Referrer*: https://docs.mongodb.com/ruby-driver/master/quick-start/
*Screen Resolution*: 2560 x 1440
*Location*: https://docs.mongodb.com/ruby-driver/master/tutorials/ruby-driver-projections/ *User-Agent*: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116 Safari/537.36 *Referrer*: https://docs.mongodb.com/ruby-driver/master/quick-start/ *Screen Resolution*: 2560 x 1440
-
0.5
This doc is a bit out of date: says 2.2 is current whereas it's 2.3.
But most importantly the syntax changed, I tried for a while doing a find with projection and never manged to make it work. I had to look at the code to see that the second arg to find is actually an option hash and I have to pass {projection: {...}} for it to work.
So a little update needs to be done here I guess