From 1242852eea738a4202c6e9964b52f91836fb9a14 Mon Sep 17 00:00:00 2001 From: Thea Choem <29684683+theachoem@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:56:06 +0700 Subject: [PATCH] close #236 fix rubocop linter warning --- app/models/vpago/adjustment_decorator.rb | 4 +--- app/models/vpago/promotion_action_decorator.rb | 4 +--- app/models/vpago/shipment_decorator.rb | 4 +--- app/models/vpago/shipping_method_decorator.rb | 4 +--- app/models/vpago/shipping_rate_decorator.rb | 4 +--- app/models/vpago/tax_category_decorator.rb | 4 +--- 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/app/models/vpago/adjustment_decorator.rb b/app/models/vpago/adjustment_decorator.rb index 3fdc10c0..f6c89561 100644 --- a/app/models/vpago/adjustment_decorator.rb +++ b/app/models/vpago/adjustment_decorator.rb @@ -25,6 +25,4 @@ def set_handle_by end end -unless Spree::Adjustment.included_modules.include?(Vpago::AdjustmentDecorator) - Spree::Adjustment.prepend(Vpago::AdjustmentDecorator) -end +Spree::Adjustment.prepend(Vpago::AdjustmentDecorator) unless Spree::Adjustment.included_modules.include?(Vpago::AdjustmentDecorator) diff --git a/app/models/vpago/promotion_action_decorator.rb b/app/models/vpago/promotion_action_decorator.rb index 717eaf55..4b56911b 100644 --- a/app/models/vpago/promotion_action_decorator.rb +++ b/app/models/vpago/promotion_action_decorator.rb @@ -6,6 +6,4 @@ def self.prepended(base) end end -unless Spree::PromotionAction.included_modules.include?(Vpago::PromotionActionDecorator) - Spree::PromotionAction.prepend(Vpago::PromotionActionDecorator) -end +Spree::PromotionAction.prepend(Vpago::PromotionActionDecorator) unless Spree::PromotionAction.included_modules.include?(Vpago::PromotionActionDecorator) diff --git a/app/models/vpago/shipment_decorator.rb b/app/models/vpago/shipment_decorator.rb index c7961248..e99b0b73 100644 --- a/app/models/vpago/shipment_decorator.rb +++ b/app/models/vpago/shipment_decorator.rb @@ -20,6 +20,4 @@ def vendor_adjustment_total end end -unless Spree::Shipment.included_modules.include?(Vpago::ShipmentDecorator) - Spree::Shipment.prepend(Vpago::ShipmentDecorator) -end +Spree::Shipment.prepend(Vpago::ShipmentDecorator) unless Spree::Shipment.included_modules.include?(Vpago::ShipmentDecorator) diff --git a/app/models/vpago/shipping_method_decorator.rb b/app/models/vpago/shipping_method_decorator.rb index fc0a56a8..da39c68a 100644 --- a/app/models/vpago/shipping_method_decorator.rb +++ b/app/models/vpago/shipping_method_decorator.rb @@ -30,6 +30,4 @@ def self.prepended(base) end end -unless Spree::ShippingMethod.included_modules.include?(Vpago::ShippingMethodDecorator) - Spree::ShippingMethod.prepend(Vpago::ShippingMethodDecorator) -end +Spree::ShippingMethod.prepend(Vpago::ShippingMethodDecorator) unless Spree::ShippingMethod.included_modules.include?(Vpago::ShippingMethodDecorator) diff --git a/app/models/vpago/shipping_rate_decorator.rb b/app/models/vpago/shipping_rate_decorator.rb index 88ac7627..88b7f158 100644 --- a/app/models/vpago/shipping_rate_decorator.rb +++ b/app/models/vpago/shipping_rate_decorator.rb @@ -22,6 +22,4 @@ def set_handle_by end end -unless Spree::ShippingRate.included_modules.include?(Vpago::ShippingRateDecorator) - Spree::ShippingRate.prepend(Vpago::ShippingRateDecorator) -end +Spree::ShippingRate.prepend(Vpago::ShippingRateDecorator) unless Spree::ShippingRate.included_modules.include?(Vpago::ShippingRateDecorator) diff --git a/app/models/vpago/tax_category_decorator.rb b/app/models/vpago/tax_category_decorator.rb index feee4bb1..5ae55790 100644 --- a/app/models/vpago/tax_category_decorator.rb +++ b/app/models/vpago/tax_category_decorator.rb @@ -6,6 +6,4 @@ def self.prepended(base) end end -unless Spree::TaxCategory.included_modules.include?(Vpago::TaxCategoryDecorator) - Spree::TaxCategory.prepend(Vpago::TaxCategoryDecorator) -end +Spree::TaxCategory.prepend(Vpago::TaxCategoryDecorator) unless Spree::TaxCategory.included_modules.include?(Vpago::TaxCategoryDecorator)