title: Creating multiple objects with one http request
body: <p>I have an rails app with json api. So far I can create single objects via POST request.</p>
  
  <p>It's fairly simple:</p>
  
  <pre><code>def create
      customer = Customer.new(customer_params)
      if customer.save
          render json: customer, status: 201
      else
          render json: customer.errors, status: 422
      end
  end
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>private
          def customer_params 
              params.require(:customer).permit(:name, :city)
          end
  </code></pre>
  
  <p>Now I want to create multiple customers by passing an array in my http request. Like this:</p>
  
  <pre><code>{
  "customer": [
      {
          "name": "foo",
          "city": "New York"
      },
      {
          "name": "bar",
          "city": "Chicago"
       }
    ]
  }
  </code></pre>
  
  <p>However, I don't know how to approach this. The first issue is that my strong parameters function doesn't accept arrays. 
  Is there a way to use strong parameters and let me loop through the array?</p>