I do not like the name LIKE
section.
It looks like each table has a column called name
. Imagine a specific name
with the name of the table from which you want this value to be.
It looks like it should be either
.where("jobs.name LIKE :name OR job_number LIKE :name", {:name => "JOB" } )
or
.where("customers.name LIKE :name OR job_number LIKE :name", {:name => "JOB" } )
I found in general, the best way to solve these problems is to look at the sql created and determine where the problem is. You can find sql in the logs.
source share