I've been looking for how to do a select with include in Rails 3 - I have a nested example:
@items = Item.where("fulfilled = ?", true).includes({:order=>[:supplier, :agent]}, :manufacturer)
This is a very taxing query to run without selects as it creates 1000s of rows of data by pulling information from all the above big tables. How can I get the query to only select these fields?
- user.name, user.created_at
- order.created_at
- supplier.name
- agent.name
- manufacturer.name