title: How can I create multiple records in Rails using single POST request?
body: <p>I have a rails api which I have generated using scaffolding in rails. 
  I have a Product model in this api. To test my api I am creating the products using curl, currently I can create only one product at a time using the curl command </p>
  
  <pre><code>curl -i -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"product: {"name":"Felix" }}' http://localhost:3000/products.json
  </code></pre>
  
  <p>Now I want to modify my api in a way that it can create multiple products from one post request so that a request something like can be executed and I can create multiple products in one request.</p>
  
  <pre><code> curl -i -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{products: {"product": {"name":"Felix" }, {"product": {"name":"Felix" } }' http://localhost:3000/products.json
  </code></pre>
  
  <p>I need help in two things </p>
  
  <p>1) How to modify my create function (which is generated from scaffold) so that it can create accept an array of products(length of array can be variable) and create multiple records for them </p>
  
  <p>2) What hash of data to be passed to curl to test the implemented functionality </p>