title: select option tag in ror?
body: <p>i am new at ror.</p>
  
  <p>option select tag in rails</p>
  
  <pre><code>&lt;%= select_tag(:city_id, '&lt;option value="1"&gt;Lisbon&lt;/option&gt;,&lt;option value="2"&gt;Madrid&lt;/option&gt;' %&gt;
  </code></pre>
  
  <p>produces this html:</p>
  
  <pre><code>&lt;select id="city_id" name="city_id"&gt;
      &lt;option value="1"&gt;Lisbon&lt;/option&gt;
  &lt;option value="2"&gt;hjkLisbon&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>and option select tag </p>
  
  <pre><code>&lt;%= select_tag(:city_id, options_for_select([['Lisbon', 1], ['Madrid', 2]])) %&gt;
  </code></pre>
  
  <p>produces this html:</p>
  
  <pre><code>&lt;select id="city_id" name="city_id"&gt;
  &lt;option value="1"&gt;Lisbon&lt;/option&gt;
  &lt;option value="2"&gt;Madrid&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>for second option select tag i am getting the dropdown with options but in first one i am not getting it, only dropdown is there in first one but no options.
  can anybody please explain me why it is so?</p>