I am doing a Search in my ''properties'' table on column
''name'' using in
my controller :
conditions = ["name LIKE ?", "%#{@params[:query]}%"] unless
@params[:query].nil?
this ''properties'' table has a FK (owner_id) in teh column
''owner'' to
link it with the table Users...
I can display the owner.name, and I would like also to Search on this
owner.name...
How shoudl I write the :condition with a JOIN to the Users table ?
combining
["name LIKE ?", "%#{@params[:query]}%"] unless
@params[:query].nil?
WITH
["owner.name LIKE ?", "%#{@params[:query]}%"] unless
@params[:query].nil?
thanks for your help
kad
--
Posted via http://www.ruby-forum.com/.