title: Rails - Constants Hash?
body: <p>I have a need for a model(?) on my app which basically contains a status of another entity.  In the entity I want to store the id of the status, but in my app, the view is talking in terms of a nice word description.  For instance, 1=New, 2=Used etc etc.</p>
  
  <p>How can I go about implementing this in the best way that means I can easily set and retrieve this status column without repeating myself?</p>
  
  <p>Ultimately I would like something like</p>
  
  <pre><code>Foo.status = 'New'  (actually sets value to 1)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Foo.status  (returns 'New', but stores 1)
  </code></pre>
  
  <p>Am I even thinking about this in the right way?</p>