title: Mongoid named scope comparing two time fields in the same document
body: <p>I need to create a named scope in Mongoid that compares two Time fields within the same document. Such as</p>
  
  <p><code>scope :foo, :where =&gt; {:updated_at.gt =&gt; :checked_at}</code></p>
  
  <p>This obviously won't work as it treats <code>:checked_at</code> as a symbol, not the actual field. Any suggestions on how this can be done?</p>
  
  <p><strong>Update 1</strong></p>
  
  <p>Here is my model where I have this scope declared, with a lot of extra code stripped out.</p>
  
  <pre><code>class User
    include Mongoid::Document
    include Mongoid::Paranoia
    include Mongoid::Timestamps
  
    field :checked_at, :type =&gt; Time
  
    scope :unresolved, :where =&gt; { :updated_at.gt =&gt; self.checked_at }
  end
  </code></pre>
  
  <p>This gives me the following error:</p>
  
  <p><code>'&lt;class:User&gt;': undefined method 'checked_at' for User:Class (NoMethodError)</code></p>