pluck method modifies existing array

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 3.1.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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)
      

              Assignee:
              Unassigned
              Reporter:
              cpuguy83
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: