Answer the question
In order to leave comments, you need to log in
SQLite3::SQLException: ambiguous column name how to fix the problem?
I know that when join there is a name conflict, however
I have a skope in which
the controller is being searched
tasks=Task.initiator_filter(params[:initiator_name])
scope :initiator_filter, ->(name){ joins(:initiator).where("users.name LIKE ?", "%{name}%")}
SQLite3::SQLException: ambiguous column name: id: SELECT "tasks".* FROM "tasks" INNER JOIN "users" ON "users"."id" = "tasks"."initiator_id" WHERE (users.name LIKE '% fdghfgfd%') AND (id IN (NULL))
(id IN (NULL)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question