title: how to create dropdown from a hash in rails 3
body: <p><strong>In rails 3, how to create a Dropdown from hash</strong></p>
  
  <p>I have following code in my User class</p>
  
  <pre><code>class User
    ...   other codes
    key :gender, Integer    # i use mongo db
  
    class &lt;&lt; self
      def genders()
        genders = {
          '1' =&gt; 'Male',
          '2' =&gt; 'Female',
          '3' =&gt; 'Secret'
        }
      end
    end
  
  end
  </code></pre>
  
  <p>In the user form, i am trying to create a gender dropdown list</p>
  
  <pre><code>&lt;%= f.collection_select nil, :gender, User.genders, :key, :value %&gt;
  </code></pre>
  
  <p>but it complain </p>
  
  <pre><code>undefined method `merge' for :value:Symbol
  </code></pre>
  
  <p>So what is the proper way to create the dropdown?</p>
  
  <p>Thanks</p>