title: How to use strong parameters with an objects array in Rails
body: <p>When using Rails 4.0 strong parameters, how do I permit JSON like this?</p>
  
  <pre><code>{
     "user":
     {
         "first_name":"Jello"
     },
     "users_to_employer":[
         {
             "start_date":"2013-09-03T16:45:27+02:00",
             "end_date":"2013-09-10T16:45:27+02:00",
             "employer":{"company_name":"Telenor"}
         },
         {
             "start_date":"2013-09-17T16:45:27+02:00",
             "end_date":null,
             "employer":{"company_name":"Erixon"}
         }
     ]
  }
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code> params.require(:users_to_employers =&gt; []).permit(
                                                   :start_date, 
                                                   :end_date =&gt; nil,
                                                   :employer =&gt; [
                                                       :company_name
                                                   ])
  </code></pre>
  
  <p>But it didn't work.</p>