Automatically build has_many :through filters