search for: vehiculo_id

Displaying 1 result from an estimated 1 matches for "vehiculo_id".

2006 Jun 16
4
problem with join
Hi all, I''m having a problem with a join inside a paginate, the code is like this: @ruta_pages, @rutas = paginate :rutas, :conditions => conds_arr, :joins => "AS ru LEFT JOIN vehiculos AS ve ON ru.vehiculo_id = ve.id", :per_page => 10, :order => "fecha DESC" The problem with this, is that the query returns the columns of both tables (vehiculos and rutas), so the id''s of rutas are messed up (with the ids of vehiculos)... The ideal query would be to make...