title: Generating this type of URI http://localhost:3000/api/products?ids=1,2,3,4
body: <p>I have this <code>http://localhost:3000/api/products</code> request that returns json format output with a list of products objects. I heard in some scenario its better to use multi-gets design where you list products ids in URI like so <code>http://localhost:3000/api/products?ids=1,2,3,4</code>. My question is how do i configure the route to return such an URI? Below is the json output returned by <code>http://localhost:3000/api/products</code>.Thank you in advance</p>
  
  <p>controller</p>
  
  <pre><code>def index
  @products=Product.all
  
  respond_to do |format|
    format.json { render json: @products.to_json}
    format.xml
  end
  end
  </code></pre>
  
  <p>json output<br>
              [</p>
  
  <pre><code>{
      "category_id": null,
      "created_at": "2011-03-25T13:35:16Z",
      "details": "Molestias pariatur consequuntur ut voluptas aperiam facere et et autem ad laudantium ut qui dolorem iste sit ut in dignissimos. Et debitis et et sunt quidem qui est est et numquam in dolorum natus sapiente nihil ipsa ratione. Quisquam aut molestiae earum voluptas vero et officiis magnam quam provident voluptatibus quia",
      "id": 1,
      "product_name": "Velit",
      "publisher_id": 1,
      "updated_at": "2012-11-12T18:45:13Z",
      "publisher_details": "http://localhost:3000/api/users/1"
  },
  {
      "category_id": null,
      "created_at": "2012-01-10T23:16:53Z",
      "details": "Temporibus quis et quam eveniet hic consequatur maiores eum expedita molestiae velit eligendi laboriosam ut molestiae. Velit delectus aliquid nobis quia velit aut dolorem omnis numquam reprehenderit quo illo saepe molestiae nisi. Soluta nihil quae soluta facilis cumque voluptates eaque amet unde non in placeat id cupiditate illum at et vero. Laborum id eaque voluptas illo eius iure",
      "id": 2,
      "product_name": "Nam Laboriosam Et Sed",
      "publisher_id": 1,
      "updated_at": "2012-11-12T18:45:13Z",
      "publisher_details": "http://localhost:3000/api/users/1"
  }]
  </code></pre>