0
Product.find(:all,
:conditions => { :companies => { :malls => { :id => 1},:products => {:title => "nexus one"} }},
:joins => [:company => :mall])
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])