title: Form helper select tag in a dependence object with elements from another object
body: <p>I´m newbie in Ruby on rails, and I´m trying to display a select with the ids from an object b) in an object a):</p>
  
  <p>Object a) Function</p>
  
  <p>Object b) Experience</p>
  
  <p>function _form.html.erb</p>
  
  <pre><code>&lt;div class="field"&gt;
  &lt;%= f.label :experience_id %&gt;&lt;br /&gt;
  &lt;%= f.number_field :experience_id %&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to create a select which display the items in the table experience. I suppose it's a loop that loops through wich all elements of @ experience but not how. I have read about form helpers but I can not enlighten. </p>
  
  <p>Thank so much</p>
  
  <p>About Second Question</p>
  
  <p>Thanks very much for your help. I tried like you proposed but the name of the select tag was not the correct name of the object and i don´t know how put it with that helper method. So i tried the same with another helper, select, and was success:</p>
  
  <p>Option a)
  select_tag :habilidad, options_for_select({"1" => 1, "2" => 2})</p>
  
  <p>Resultant Source code:</p>
  
  <pre><code>&lt;div class="field"&gt;
      &lt;label for="skill_habilidad"&gt;Habilidad&lt;/label&gt;&lt;br /&gt;
      &lt;select id="habilidad" NAME="habilidad"&gt;&lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;&lt;/select&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>Option b)
  select(:skill, :habilidad, {"1" =>1, "2" => 2, "3" => 3, "4" => 4, "5" => 5})</p>
  
  <p>Resultant source code:</p>
  
  <pre><code>&lt;div class="field"&gt;
      &lt;label for="skill_habilidad"&gt;Habilidad&lt;/label&gt;&lt;br /&gt;
      &lt;select id="skill_habilidad" NAME="skill[habilidad]"&gt;&lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;option value="4"&gt;4&lt;/option&gt;
  &lt;option value="5"&gt;5&lt;/option&gt;&lt;/select&gt; 
    &lt;/div&gt;
  </code></pre>