From 1e8543dfe7a9a1c420fc0011a1012a064d8daf97 Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Thu, 14 May 2020 04:50:57 +0800 Subject: [PATCH] Address violation of Rubocop Rails/ReadWriteAttribute --- app/models/spree/stock_item.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spree/stock_item.rb b/app/models/spree/stock_item.rb index 5c9f390567..47bbf14fbd 100644 --- a/app/models/spree/stock_item.rb +++ b/app/models/spree/stock_item.rb @@ -42,7 +42,7 @@ module Spree private def count_on_hand=(value) - write_attribute(:count_on_hand, value) + self[:count_on_hand] = value end def process_backorders