If I have a result from Activerecord I have a array of hashes, if I have eager loaded has_one associations each record hash has a nested hash of its associated record.
My question is, is there a quick rails method that allows you to merge these nested hashes into a single hash per record?
An analogy would be converting records and there associations into single table rows.
Another analogy would be a converting a hash of nested hashes at n levels into a single level hash.
Approach 1:
Include them in the select clause
Approach 2:
Use delegation