Product.find(:all,
:conditions => { :companies => { :malls => { :id => 1},:products => {:title => "nexus one"} }},
:joins => [:company => :mall])
views:
44answers:
1
+1
A:
I found the solution, I think I have to take break,
Product.find(:all,:conditions => ['title LIKE ? and mall_id = ?', "%#{search}%",mall_id],
:joins => [:company => :mall])
Amer
2010-08-11 14:58:26