From: "Kroeger, Simon (ext)" Date: 2006-05-31T22:47:36+09:00 Subject: Re: habtm on an array > > class User > > def files > > groups.inject([]) {|all_files, group| all_files | group.files} > > end > > end > > Doh! Yeah. I goofed. Thanks. > > Kirk Haines We all do that - from time to time :) As Rails implements Symbol#to_proc one should be able to do myuser.groups.map(&:files).flatten.uniq but that is getting esotheric. cheers Simon