Fix SQL ambiguous name error
This commit is contained in:
parent
b042efdcba
commit
18922122b4
2 changed files with 2 additions and 2 deletions
|
@ -194,7 +194,7 @@ class Admin::ProceduresController < AdminController
|
|||
def path_list
|
||||
json_path_list = ProcedurePath
|
||||
.find_with_path(params[:request])
|
||||
.pluck(:path, :administrateur_id)
|
||||
.pluck('procedure_paths.path', :administrateur_id)
|
||||
.map do |path, administrateur_id|
|
||||
{
|
||||
label: path,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue