title: Assigning Rails selection box data to a variable
body: <p>Let's say I have the following selection box, which lists all the companies in the database:</p>
  
  <pre><code>&lt;select class="selectpicker"&gt;
    &lt;% @companies.each do |company| %&gt;
      &lt;option&gt;&gt;&lt;%= company.name %&gt;&lt;/option&gt;
    &lt;% end %&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>How do I assign the selected company to a variable named "selected_company" when I click submit? Can you give me an example of how the form and the controller would look like?</p>
  
  <p>Thank you for your time!</p>