title: Create array from one field in a set of objects in Rails 5
body: <pre><code>@ride.passengers
  </code></pre>
  
  <p>Gives me something like this:</p>
  
  <pre><code>[
    {
      "id": null,
      "salutation": "Sr",
      "first_name": "fsd",
      "last_name": "sfd",
      "email": "sf@sdf.sdf",
      "mobile": "123234345",
      "company_id": 7,
      "cost_center_id": null,
      "created_at": null,
      "updated_at": null
    },
    {
      "id": null,
      "salutation": null,
      "first_name": null,
      "last_name": null,
      "email": null,
      "mobile": null,
      "company_id": 12,
      "cost_center_id": null,
      "created_at": null,
      "updated_at": null
    }
  ]
  </code></pre>
  
  <p>I want to create an array with all company_ids:</p>
  
  <pre><code>[7,12]
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>@ride.passengers.pluck(:company_id)
  </code></pre>
  
  <p>But this returns an empty error.</p>