title: Type error on nested form
body: <p>been banging my head on the table over this one.  I have another nested form but this one is driving me crazy.</p>
  
  <p>The error is:</p>
  
  <pre><code>TypeError in CompaniesController#create
  no implicit conversion of Symbol into Integer
  @company = Company.new(company_params)
  </code></pre>
  
  <p>The controller:</p>
  
  <pre><code>class CompaniesController &lt; ApplicationController
    layout 'welcome'
  
    def new
      @company = Company.new
    end
  
    def create
      @company = Company.new(company_params)
  
      if @company.save
        flash[:notice] = "New company created successful."
        redirect_to admin_accounts_path
      else
        flash.now[:alert] = "Creation failed, please try again"
        render :new
      end
    end
  
    private
  
    def company_params
      params.require(:company).permit(:name, :location, :users_attributes =&gt; [:email, :password])
    end
  end
  </code></pre>
  
  <p>On the new.html.erb:</p>
  
  <pre><code>  &lt;%= render partial: 'form', locals: { company: @company, users_attributes: :users_attributes } %&gt;
  </code></pre>
  
  <p>This code looks exactly like another nested setup I have, but it works :p</p>
  
  <p>I had read that sometimes changing the params from => to just having a semicolon works, but replacing the user_attributes => with a user_attributes: didn't change anything.</p>
  
  <p>EDIT: form.html.erb</p>
  
  <pre><code>&lt;%= form_for company, url: companies_path do |f| %&gt;
    &lt;div class="col-12"&gt;
      &lt;div class="row"&gt;
        &lt;div class="col p-0 mr-3"&gt;
          &lt;div class="form-group"&gt;
            Company &lt;%= f.label :name %&gt;
            &lt;%= f.text_field :name, :placeholder =&gt; 'Company name', class: 'form-control' %&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;%= f.label :location %&gt;
            &lt;%= f.text_field :location, :placeholder =&gt; 'Location', class: 'form-control' %&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col p-0"&gt;
          &lt;%= f.fields_for users_attributes do |user_f| %&gt;
            &lt;div class="form-group"&gt;
              &lt;%= user_f.label :email %&gt;
              &lt;%= user_f.text_field :email, :placeholder =&gt; 'Your Email Address', class: 'form-control' %&gt;
            &lt;/div&gt;
            &lt;div class="form-group"&gt;
              &lt;%= user_f.label :password %&gt;
              &lt;%= user_f.password_field :password, :placeholder =&gt; 'Password', class: 'form-control' %&gt;
            &lt;/div&gt;
          &lt;% end %&gt;
        &lt;/div&gt;
        &lt;div class="col-12 p-0"&gt;
          &lt;%= f.submit "Sign-Up", :class =&gt; 'btn btn-primary btn-block btn-lg' %&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>