title: A constant for a default value in Rails migration
body: <p>I'm just starting with Rails and decided to make a small app to learn with something practical. </p>
  
  <p>I have a user class which has a user group integer field. I want to add to the migration a :default value using a constant.</p>
  
  <p>In my user model I defined the different groups with constants so that I can later easily check "admin?" etc. </p>
  
  <pre><code>t.integer :user_group, :default =&gt; USER
  </code></pre>
  
  <p>I get the following error on db:migrate</p>
  
  <blockquote>
    <p>rake aborted!
    Expected [...]/app/models/user.rb to define USER</p>
  </blockquote>
  
  <p>However in the user model I have this:</p>
  
  <pre><code>ADMIN = 1
  USER = 2
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>