title: Rails scaffold parameter non permitted
body: <p>I have a Ruby on Rails application with some generated scaffold.
  Now, in one of them I need to add a parameter that wasn't planned initially.</p>
  
  <p>The situation is that I have two objects: Block and Keywords. The relationship between them is <code>has_and_belongs_to_many</code>. That allows me to have many keywords associated to many blocks and vice versa.
  I want to add the option to add some keywords to the object Block during the creation.</p>
  
  <p>I added the following code in the <code>/views/blocks/_form.html.erb</code> file:</p>
  
  <pre><code>  &lt;div class="field"&gt;
      &lt;%= f.label :keywords %&gt;&lt;br&gt;
      &lt;%= f.collection_select(:keywords, @keywords.order(:name), :id, :name, {include_blank: true}, {:multiple =&gt; true}) %&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>I added the parameter in the controller as well:</p>
  
  <pre><code>def block_params
    params.require(:block).permit(:name, :title, :description, :price, :instagram, :image, :main, :action, :keywords, :block_type_id, :module_keyword_id, :playlist_id)
  end
  </code></pre>
  
  <p>Nevertheless I get this message in the log</p>
  
  <pre><code>Unpermitted parameter: keywords
  </code></pre>
  
  <p>and the keywords are not added to the block.
  What am I missing?</p>