title: Find a record by id for each integer in an array
body: <p>I have an array of id's
  <code>["2", "3", "2", "3"]</code> for example.</p>
  
  <p>I'm attempting to iterate through these array elements.</p>
  
  <pre><code>@car = car.first
  @driver = @car.drivers.first
  
  service_ids = ["2", "3", "2", "3"]
  
  service_ids.each do |service_id|
    arr = []
    results = @driver.services.find_by(id: service_id)
    arr &lt;&lt; results
  end
  </code></pre>
  
  <p>arr only returns a single record, likely the last record found.</p>
  
  <p>How do you accomplish this? Is there a rails method that does something like this?</p>
  
  <p>Thanks.</p>