I found a solution that seems to be working well, I added a named scope on the artist class:
named scope :agencies include, lambda { |c| { :joins=> :agents,:conditions => { :agents users => { :company => c } } } }
The search field is now called search[artist agencies include]
Gordon Isnor
2009-09-07 23:12:32