title: Sharing ActiveRecord::Base enums across models
body: <p>I have 2 models</p>
  
  <pre><code>class Author &lt; ActiveRecord::Base
    enum state: [:draft, :ready]
  end
  
  class Creation &lt; ActiveRecord::Base
    enum state: [:draft, :ready]
  end
  </code></pre>
  
  <p>As you can see both Models have define <strong>state</strong> enum. I'd like to get rid of this repetition and move <strong>state</strong> somewhere else.</p>
  
  <p>How can I do that, while keeping all useful thing like <code>Author.ready</code> and automatic conversion between integers in database and strings in code.</p>