title: Ruby on Rails - Model Hash for Select Tag
body: <p>I really wanted to try to figure out how to use a Category or Type Hashes or Arrays in Models, but I feel like i'm a bit confused.  Here is what I'm trying to do and I would appreciate any help.</p>
  
  <p>I have an Alert Model in my application and I originally had a Alert_Type table but wanted to get rid of it because it was more queries than I needed for really only a high, medium, low type of alert, so I was going to move them into the model</p>
  
  <pre><code>  SEVERITY = { "High" =&gt; :high, 
                 "Medium" =&gt; :medium,
                 "Low" =&gt; :low }
  
  &lt;%= select :alert, :severity, Alert::SEVERITY, {:prompt =&gt; "Select one"}  %&gt;
  </code></pre>
  
  <p>I feel like this is incorrect because when I pull the database value it is high, low, medium but need to get the text of that value.  When i did this,</p>
  
  <pre><code>SEVERITY = {  :high =&gt; "High"
                     :medium =&gt; "Medium",
                     :low =&gt; "Low"  }
  </code></pre>
  
  <p>I had issues with the dropdowns.  I'm trying to figure out the best practice approach so that when I may or may not need translations, then it would work correctly.  Should I do a hash or just array.  Thanks so much!</p>