title: Rails Enum return integer value, not string representation
body: <p>I have a table which contains an integer based column (status) which I'm using for an enum attribute within the Rails model.</p>
  
  <p>At the moment of doing:</p>
  
  <pre><code>Post.select(:id, ..., :status)
  </code></pre>
  
  <p>Defined as:</p>
  
  <pre><code>enum status: { inactive: 0, active: 1, ... }
  </code></pre>
  
  <p>It returns everything as expected, but the status column is returned in its string value as <em>inactive</em>, <em>active</em>, etc. But I need it as an integer.</p>
  
  <p>How can I get that?</p>
  
  <p>I'm currently just using <code>ActiveRecord::Base.connection.execute</code> and passing a raw query:</p>
  
  <pre><code>ActiveRecord::Base.connection.execute('select id, ..., status from posts')
  </code></pre>