title: Using options_from_collection_for_select
body: <p>I am trying to use </p>
  
  <pre><code>options_from_collection_for_select(collection, value_method, text_method, selected = nil)
  </code></pre>
  
  <p>But I am unable to pass proper parameter to it. What should be type on <code>collection</code> element? (Sample for complete usage will be helpful)</p>
  
  <p>I have to use it with format like <code>Name=AL</code> and <code>ID=23</code>, like it is State name and it Code.</p>
  
  <p>So for using how should I provide the collection object to it.</p>
  
  <p>I have tried with <code>Hash</code>, <code>Map</code> and <code>Array</code></p>