title: Parameters not being read even though they appear to be passed
body: <p>I'm making a form that creates more than one record for the user depending on how many items the user decides to check off in the form using checkboxes.</p>
  
  <p>Currently, I'm running into an error where <code>param is missing or the value is empty: itemrecord</code> even though in the log, it appears that <code>params</code> are passing through:</p>
  
  <pre><code>{"utf8"=&gt;"✓", "authenticity_token"=&gt;"m2NMruoFRr6lpsuVMK9UthlY0bsJsPmf1LWce2uKaH4=", ":item_name"=&gt;["Backpack", "Water filter"], "commit"=&gt;"Go!"}
  </code></pre>
  
  <p>Model relationship is that a <code>User has_many :inventories</code></p>
  
  <p>Controller code:</p>
  
  <pre><code>def create
      @itemrecord = @current_user.inventories.build
  
      items_to_be_saved = []
      inventory_params.each do |i|
          items_to_be_saved &lt;&lt; ({ :signup_id =&gt; @current_user.id,  :item_name =&gt; i })
      end
  
      if Inventory.create items_to_be_saved
          flash[:success] = "Thanks!"
          redirect_to root_path
      else
          render new_inventory_path
      end
  end
  
  def inventory_params
    params.require(:itemrecord).permit(:item_name)
  end
  </code></pre>
  
  <p>View code:</p>
  
  <pre><code>          &lt;%= form_for @itemrecord do |f| %&gt;
  
              &lt;!-- In case you're wondering, the @wishlist below is basically a hash of categories of items and items. This hash is updated in the controller, and then used by multiple views to create the same table of items. --&gt;
  
              &lt;% @wishlist.each do |category, list| %&gt;
                &lt;div class="col-xs-2"&gt;
                  &lt;div class="form-group box"&gt;
                    &lt;h5&gt; &lt;%="#{category}"%&gt; &lt;/h5&gt;
                      &lt;% list.each do |thing| %&gt;
                          &lt;%= check_box_tag ":item_name[]", "#{thing}" %&gt;
                        &lt;/br&gt;
                      &lt;% end %&gt;
                  &lt;/div&gt;
                &lt;/div&gt;  
              &lt;% end %&gt;
  
                &lt;%= f.submit "Go!", class: "btn btn-primary btn-large btn-block" %&gt;
              &lt;/div&gt;
  
            &lt;% end %&gt;
  </code></pre>
  
  <p>By the way I also tried changing <code>:item_name</code> to <code>:item_names</code> to account for the array based on what else I read on SO, but that didn't fix it either</p>