title: options_from_collection_for_select issue in Ruby on Rails
body: <p>I am creating select group and trying to fetch data from database and populate same in select group.I need to populate groupname which is available in execution_group table. I am getting 'undefined method `map' for nil:NilClass' error.How to solve this issue? Below the code i am using.</p>
  
  <pre><code>&lt;select id="select-execution-group" class="form-control"&gt;
    &lt;option value=""&gt;Select Group Name&lt;/option&gt;
    &lt;%= options_from_collection_for_select(@execution_group,:groupname, :groupname) %&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Thanks,
  Alex</p>