0
我不知道我在哪裏錯了。 '主'是所有工作的完整列表。然後我爲不同的door_manufacturer
設置了三個過濾器。有些門票有parts_mfr
,如果它與manufacturing_location
相同,我需要提取。我很困惑。再次,我不知道我在這裏錯過了什麼。複雜的鋼軌查詢
session[:door_location] = params[:location] || session[:door_location] || 'MASTER'
if session[:door_location] == 'MASTER'
@tickets = Ticket.where(active: true,
complete_in_shop: false,
manufacturing_location: session[:factory]).
order(calendar_date: :asc).order(:calendar_order).
limit(90)
else
tickets_door_location = Ticket.where(active: true, complete_in_shop: false,
manufacturing_location: session[:factory])
tickets_parts_location = Ticket.where(active: true, complete_in_shop: false,
parts_mfr: session[:door_location])
@tickets = (tickets_door_location << tickets_parts_location).
order(calendar_date: :asc).order(:calendar_order).
limit(90)
end