title: Rails 4 - how to use "includes(:model)" with ".select(...)"? Is there any alternative?
body: <p>I have 3 tables with 45+ columns each. Here are the models:</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    belongs_to :manufacturer
    belongs_to :team
  end
  class Manufacturer &lt; ActiveRecord::Base
    has_many :products
  end
  class Team &lt; ActiveRecord::Base
    has_many :products
  end
  </code></pre>
  
  <p>I need to fetch all projects at certain stages, so:</p>
  
  <pre><code>  @products = Product.where('products.stage != 3 AND products.stage != 4 AND products.stage != 5')
                       .order(sort_column + " " + sort_direction) 
  </code></pre>
  
  <p>But - the N+1 problem will occur, so:</p>
  
  <pre><code>  @products = Product.includes(:team, :manufacturer)
                       .where('products.stage != 3 AND product.stage != 4 AND products.stage != 5')
                       .order(sort_column + " " + sort_direction) 
  </code></pre>
  
  <p>But because the tables have 135+ columns and fetching all of them is ineffective - even more I need only 10 columns (6 from <code>products</code>, 2 from <code>teams</code> and 2 from <code>manufacturers</code>), I wanted to use <code>.select(...)</code> to specify only the fields I need.</p>
  
  <p>But I found out there's no way to use eager loading (<code>includes(...)</code>) with <code>.select(...)</code>.</p>
  
  <p>What can I do now? Is there some other approach?
  I've tried to write it as a raw SQL query, but don't know how to re-write the <code>includes(...)</code> part.</p>
  
  <p>Thank you in advance.</p>