used flat_map instead of map.flatten
Merge pull request #11598 from Karunakar/flat_map1

Used flat_map instead of map.flatten in mas_many_through_associations_test.rb