title: How to convert ActiveRecord::QueryMethods::WhereChain to ActiveRecord_Relation
body: <p>I have untypical problem today. I have where condintion that takes block:</p>
  
  <pre><code>User.where do |user|
    user if Avatar.where(id: user.avatar_id).empty?
  end.first
  </code></pre>
  
  <p>This returns me:</p>
  
  <pre><code>NoMethodError: undefined method `first' for #&lt;ActiveRecord::QueryMethods::WhereChain:0x0000000c672f08&gt;
  </code></pre>
  
  <p>Is there any way to transform ActiveRecord::QueryMethods::WhereChain to ActiveRecord_Relation?</p>