Rails 3 refuses to eager load
问题 I'm working in Rails 3.0.7. I have some many-to-many and some one-to-many associations that fail to eager load. My associations are: Person has_many :friends Person has_many :locations through=> :location_histories Location belongs_to :location_hour Location_hour has_many :locations In my controller I have the following: @people = Person.includes([[:locations=>:location_hour],:friends]).where("(location_histories.current = true) AND (people.name LIKE ? OR friends.first_name LIKE ? OR friends