mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Auto-correct violationso of Rubocop Layout/*
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
class StockItem < ActiveRecord::Base
|
||||
belongs_to :stock_location, class_name: 'Spree::StockLocation'
|
||||
@@ -39,15 +40,17 @@ module Spree
|
||||
end
|
||||
|
||||
private
|
||||
def count_on_hand=(value)
|
||||
write_attribute(:count_on_hand, value)
|
||||
end
|
||||
|
||||
def process_backorders
|
||||
backordered_inventory_units.each do |unit|
|
||||
return unless in_stock?
|
||||
unit.fill_backorder
|
||||
end
|
||||
def count_on_hand=(value)
|
||||
write_attribute(:count_on_hand, value)
|
||||
end
|
||||
|
||||
def process_backorders
|
||||
backordered_inventory_units.each do |unit|
|
||||
return unless in_stock?
|
||||
|
||||
unit.fill_backorder
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Spree::StockItem do
|
||||
|
||||
Reference in New Issue
Block a user