-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Using the pluck method modifies the current array to only return the plucked field.
@foos= Foo.all
ids = @foos.pluck(:_id)
In this example, @foos has been modified to return as if I had done:
@foos= Foo.all.only(:_id)