title: Why "accepts_nested_attributes_for" is not working?
body: <p>I have following models</p>
  
  <p>Order</p>
  
  <pre><code>    class Order &lt; ApplicationRecord
           has_many  :items
           accepts_nested_attributes_for :items
      end
  </code></pre>
  
  <p>and Item</p>
  
  <pre><code>class Item &lt; ApplicationRecord
  
  
  belongs_to  :order
  
  end
  </code></pre>
  
  <p>And I have following Json to parse where an order contains multiple items</p>
  
  <pre><code>    {
    "location": "takeAway",
    "status": "preparing",
    "items": [
      {
          "id":2,
        "name": "coffee",
        "quantity": 1,
        "milk": "whole",
        "size": "small"
      }
    ]
  }
  </code></pre>
  
  <p>And I have following code my controller.</p>
  
  <pre><code> params.require(:order).permit(:location, :status, items_attributes:  [:id, :name, :quantity, :milk, :size])
  </code></pre>
  
  <p>Why I am not able to save Order records with item records? Can someone please help?</p>