Fix SQL ambiguous name error

This commit is contained in:
Paul Chavard 2018-09-13 18:59:51 +02:00
parent b042efdcba
commit 18922122b4
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ class ProcedurePath < ApplicationRecord
def self.find_with_path(path)
joins(:procedure)
.where.not(procedures: { aasm_state: :archivee })
.where("path LIKE ?", "%#{path}%")
.where("procedure_paths.path LIKE ?", "%#{path}%")
.order(:id)
end