NoMethodError (undefined method `permit' for #<Array:0x007f51c020bd18> : <p>I am getting this error and using Rails 5.</p>

<blockquote>
  <p>NoMethodError (undefined method <code>permit' for #&lt;Array:0x007f51cf4dc948&gt;
  app/controllers/traumas_controller.rb:99:in</code>trauma_params' 
  app/controllers/traumas_controller.rb:25:in `create_multiple'</p>
</blockquote>

<p>Controller params are as below.</p>

<blockquote>
  <p>Started POST "/traumas/create_multiple" for 127.0.0.1 at 2016-10-04
  20:09:36 +0530 Processing by TraumasController#create_multiple as JS<br>
  Parameters: {"utf8"=>"✓", "fields"=>[{"contusions"=>"1", "burns"=>"",
  "at_scene"=>"At Scene", "emergency_detail_id"=>"96",
  "trauma_region"=>"Head-Back"}], "commit"=>"Submit"}</p>
</blockquote>

<p>I am trying to create record as below in controller:</p>

<pre><code>  def create_multiple
    trauma_params
    params[:fields].each do |values|
       u = Trauma.create(values)
    end
  end

def trauma_params
        params.require(:fields).permit(:fields =&gt; [])
end
</code></pre>

<p>Please help me to resolve this issue.</p>

<p>Thanks in advance.</p>

<p>Kiran.</p>
