From 4b2099625c200405571b0488ceca797e31fa55ad Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 4 Oct 2024 14:34:17 +1000 Subject: [PATCH] Clarify method action with name Thanks, David. --- app/jobs/backorder_job.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/jobs/backorder_job.rb b/app/jobs/backorder_job.rb index f61527a308..174fe125ff 100644 --- a/app/jobs/backorder_job.rb +++ b/app/jobs/backorder_job.rb @@ -38,7 +38,7 @@ class BackorderJob < ApplicationJob def place_backorder(order) user = order.distributor.owner - items = backorder_items(order) + items = backorderable_items(order) # We are assuming that all variants are linked to the same wholesale # shop and its catalog: @@ -65,7 +65,7 @@ class BackorderJob < ApplicationJob # We look at linked variants which are either stock controlled or # are on demand with negative stock. - def backorder_items(order) + def backorderable_items(order) order.line_items.select do |item| # TODO: scope variants to hub. # We are only supporting producer stock at the moment.