Product.find(:all, :conditions => { :companies => { :malls => { :id => 1},:products => {:title => "nexus one"} }}, :joins => [:company => :mall])
Я нашел решение, думаю, мне нужно сделать перерыв,
Product.find(:all,:conditions => ['title LIKE ? and mall_id = ?', "%#{search}%",mall_id], :joins => [:company => :mall])