I got the following error:
PG::UndefinedTable: ERROR: missing FROM-clause entry for table "clients".
This occurs when I try to execute the following query:
SELECT "folders".* FROM "folders" WHERE (clients.name ilike '%aleena%') ORDER BY clients.name LIMIT 10):
The following code is used for select:
def search_folders
Folder.where('clients.name ilike :search', search: "%#{@params[:s]}%")
.references(:clients)
.order('clients.name')
.limit(@params[:per] || 10)
end
folderstable in your db? Did you create and run your migrations? - Marek Lipkafolders, but you're usingclientscolumns in yourwhereclause. - Marek Lipka