title: Write hash into 'value' in select_tag using options_for_select
body: <p>I have a collection that looks like:</p>
  
  <pre><code>CONST_COLLECTION:{
    "Attribute name 1"=&gt;{:one_key=&gt;"First Value", :second_key=&gt;"Second Value"},
    "Attribute name 2"=&gt;{:one_key=&gt;"Value 3", :second_key=&gt;"Value 4"},
    "Attribute name 3"=&gt;{:one_key=&gt;"Value 5", :second_key=&gt;"Value 6"}
  }
  </code></pre>
  
  <p>I have to show a drop-down list where options should be <code>'Attribute name 1'</code> and values should eq <code>{:one_key=&gt;"First Value", :second_key=&gt;"Second Value"}</code></p>
  
  <p>That's my view:</p>
  
  <pre><code>select_tag("user[selected_attribute]", options_for_select(CONST_COLLECTION))
  </code></pre>
  
  <p>But this code produces the following:</p>
  
  <pre><code>&lt;option value="Attribute name 1" one_key="First Value" second_key="Second Value"&gt;Attribute name 1&lt;/option&gt;
  &lt;option value="Attribute name 2" one_key="Value 3" second_key="Value 4"&gt;Attribute name 2&lt;/option&gt;
  &lt;option value="Attribute name 3" one_key="Value 5" second_key="Value 6"&gt;Attribute name 3&lt;/option&gt;
  </code></pre>
  
  <p>And that is what controller receives when first option is selected and form is submitted:</p>
  
  <pre><code>Parameters: {..., "user"=&gt;{... "selected_attribute"=&gt;"Attribute name 1", ...}, ...}
  </code></pre>
  
  <p>Controller receives only label of drop-down list, but this hash <code>{:one_key=&gt;"First Value", :second_key=&gt;"Second Value"}</code> was not passed to controller.</p>
  
  <p>How should I pass values to controller to receive hash value in user['selected_attribute'] like this:</p>
  
  <pre><code>Parameters: {..., "user"=&gt;{... "selected_attribute"=&gt;{:one_key=&gt;"First Value", :second_key=&gt;"Second Value"}, ...}, ...}
  </code></pre>
  
  <p>Thanks!</p>