Now that adjustment.update! has been renamed to adjustment.update_adjustment! we can use AR's update! on adjustment

This commit is contained in:
Luis Ramos
2021-05-09 22:08:57 +01:00
committed by Andy Brett
parent b2e97fe1d2
commit 341f6c9f62

View File

@@ -127,11 +127,7 @@ module Spree
end
def set_absolute_included_tax!(tax)
# This rubocop issue can now fixed by renaming Adjustment#update! to something else,
# then AR's update! can be used instead of update_attributes!
# rubocop:disable Rails/ActiveRecordAliases
update_attributes! included_tax: tax.round(2)
# rubocop:enable Rails/ActiveRecordAliases
update! included_tax: tax.round(2)
end
def display_included_tax