title: rails nested form not permitting a parameter that it should
body: <p>I can't figure out why this nested form is not working.  Skill belongs_to Profile and profile has_many skills.  For some reason, the sever logs show the following error when the form is submitted:</p>
  
  <pre><code>Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"gdskfkjsdflkdjshgk",
   "profile"=&gt;{"skill"=&gt;{"label"=&gt;"PHP"}}, "commit"=&gt;"ADD +", "id"=&gt;"134"}
  
  Unpermitted parameters: skill
  </code></pre>
  
  <p>Here is the form code:</p>
  
  <pre><code>&lt;%= form_for @profile  do |f| %&gt;            
          &lt;%= f.fields_for :skill do |builder| %&gt;
                 &lt;%= builder.select :label, @crafts.collect {|craft| craft.label},
                    {include_blank: true} %&gt;
          &lt;% end %&gt;   
  
          &lt;%= f.submit "ADD +", :id =&gt; "clickme", :class =&gt; 'button button-add' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Here are the strong parameters in the profiles controller:</p>
  
  <pre><code>params.require(:profile).permit( skill_attributes: [:label, :id])   
  </code></pre>
  
  <p>Here is the edit controller for the form action:</p>
  
  <pre><code>def edit
      @profile = current_user.profile 
      @skill = Skill.new  #field for new skill
  end
  </code></pre>
  
  <p>Here is the relevant part of the profile model:</p>
  
  <pre><code>class Profile &lt; ActiveRecord::Base
      has_many :skills
      accepts_nested_attributes_for :skills,  :allow_destroy =&gt; true
  end
  </code></pre>
  
  <p>The reason I use "skill_attributes" and "f.fields_for :skill" is because I only want one skill to be created/updated at a time and using the plural puts two inputs on the page. </p>