Patch review: has_many through ignores hash conditions

Hi,

Hash conditions (on has_many associations) are ignored when accessing
through a HMT.

For example:
# class Author
has_many :published_posts, :class_name => "Post", :conditions =>
"posts.body = 1"
has_many :published_comments, :source => :comments, :through => :published_posts

Author.find(:first).published_comments # works!

But:
#class Autor
has_many :published_posts, :class_name => "Post", :conditions =>
{:published => true}
has_many :published_comments, :source => :comments, :through => :published_posts

Author.find(:first).published_comments # doesn't work! :frowning:

Here is the patch (with tests) to fix this:

http://dev.rubyonrails.org/ticket/11447

Cheers