title: Enums in Ruby and getting string value
body: <p>I have the following module in one of my rails models:</p>
  
  <pre><code>module Color
     RED = 0
     BLUE = 1
     YELLOW = 2
  end
  </code></pre>
  
  <p>I store these values in a db as ints by doing <code>Color::RED</code> etc.  When I retrieve the values back I want to get the string, ie "red".  But I am having trouble converting 0 -> "RED"/"red".  What am I missing?  Can I do this with the module approach or is there a better way?</p>