But the issue is when i have
people = Person.find(:all, :include => [:address,:suburb], :limit => 10)
give_me_a_list_of_all_the_included_attributes_including_those_in_relationships(people)
I can't simply inspect people[0] and look at those relationships,
because if people[0] doesn't have an address defined and people[1] does
the left join means that I won't see the suburb defined.
I thought an easy solution would be to hack up ActiveRecord::Base.find
so that if an :include is passed, it stores that in each and every
instance of the model. That way I can just inspect the hash and easily
work out what was included.
The only other option I can think, is having my method
give_me_a_list_of_all_the_included_attributes_including_those_in_relationships
take another parameter which specifies the includes which in the long
run is not as easy for the end user.