title: Additional fields in form
body: <p>I have 2 scaffolds Role(name:string), Permission(name:string) I created a relation between them. So now i can display Role's permissions in an easy way: Role.permissions.</p>
  
  <p>The problem is to create a form for new Role, because in addition to the field 'name' I would like to add there a list of permissions (checkboxes).</p>
  
  <p>This is what I managed to do so far. (Now I'm using a textbox instead of checkbox)</p>
  
  <pre><code>&lt;%= form_for(@role)  do |f| %&gt;
    &lt;% if @role.errors.any? %&gt;
      &lt;div id="error_explanation"&gt;
        &lt;h2&gt;&lt;%= pluralize(@role.errors.count, "error") %&gt; prohibited this role from being saved:&lt;/h2&gt;
  
        &lt;ul&gt;
        &lt;% @role.errors.full_messages.each do |msg| %&gt;
          &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
        &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
    &lt;div class="field"&gt;
      &lt;%= f.label :name %&gt;&lt;br /&gt;
      &lt;%= f.text_field :name %&gt;
    &lt;/div&gt;
  
    &lt;div class="list_of_fields"&gt;
      &lt;div class="field"&gt;
        &lt;%= text_field_tag :myVariable] %&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="actions"&gt;
      &lt;%= f.submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Precisely I'm talking about this piece of code:</p>
  
  <pre><code>  &lt;div class="list_of_fields"&gt;
      &lt;div class="field"&gt;
        &lt;%= text_field_tag :myVariable] %&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>This produces:</p>
  
  <blockquote>
    <p>Parameters: {"utf8"=>"â",
    "authenticity_token"=>"MdS0VkLAxGoZM8P71H0a9M54CpMt8DnnwSp75UVGtqE=",
    "role"= {"name"=>"abc"}, "myVariable"=>"xyz", "commit"=>"Create Role"}</p>
  </blockquote>
  
  <p>I don't like this solution because if somebody chooses a specific name of permission it may  fail ('commit' e.g.).</p>
  
  <p>I would like to close all these additional fields within a hash. What's the right way to do this?</p>