title: Enumeration in Ruby on rails
body: <p>i am a C# programmer and i am looking in to ruby on rails. but i am having some trouble probably with the mind set or something.</p>
  
  <p>I have an object Vote, that object can be Pro, Neutral or con.</p>
  
  <p>I would normaly make the vote object have a field some thing like this</p>
  
  <pre><code>private VoteEnum voteEnum = VoteEnum.Neutral
  </code></pre>
  
  <p>how on earth can i acomplish this in ruby.</p>
  
  <p>i have found some examples like:</p>
  
  <pre><code>def MyClass &lt; ActiveRecord::Base
    ACTIVE_STATUS = "active"
    INACTIVE_STATUS = "inactive"
    PENDING_STATUS = "pending"
  end
  </code></pre>
  
  <p>Then, when using the model from another class, I reference the constants</p>
  
  <pre><code>@model.status = MyClass::ACTIVE_STATUS
  @model.save
  </code></pre>
  
  <p>This seems correct to me but my main question is how do i tell the model that status is the type of enum or constain..</p>
  
  <p>I hope you understand my question, and hope you can help me get my mind wrapped around this.</p>