title: Rails - using enum in a .where query
body: <p>I am using enum on a model:</p>
  
  <p><code>enum status: [:pending, :approved]</code></p>
  
  <p>I have a uniqueness validation in the model that looks like this:</p>
  
  <pre><code>validates :item_id, uniqueness: { scope: :user_id, conditions: -&gt; { where(status: :approved) }, message: "You already have this item." }
  </code></pre>
  
  <p>This doesn't work.  It will only work if I change <code>:approved</code> to <code>1</code>.  I'm confused as to why I can't use the status name here when I can do something like <code>Item.first.update_attributes(status: :approved)</code> and it works fine.</p>