Hi,
I got my patch verified a couple of weeks ago but it just sits there;
http://dev.rubyonrails.org/ticket/10480
Yesterday I updated it so it still applies to the trunk but how long
do I need to maintain it in this fashion? Is there another channel I
should us to whore for inclusion?
Remco
You've done everything you need to to get that applied, we're just
chronically behind on the backlog for report 12. Hopefully we'll
catch up over the next week, apologies that it got this bad again.
I'm not sure I follow the need for :group in has_many :through though.
Can you give an example other than the one in the patch?
Imagine a jukebox application containing tracks, artists and albums;
tracks belong to albums and artists, an artist has many tracks and an
album has many tracks. To get the artists which play on an album you
could add the following to album: "has_many :artists, :through
=> :tracks, :group_by => 'artist.id'". The count method stopped
working properly in this construct since rails 2.
A workaround for this problem would be to use the :uniq option but
this simply uses uniq! after querying, instead of having the database
reduce the amount of results.
Remco