Fix Rubocop InverseOf offense in Order

- also fix failing spec due to adding inverse
This commit is contained in:
cyrillefr
2025-04-03 12:39:06 +02:00
parent a7c77dc894
commit 019c703b1c
3 changed files with 2 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ module Spree
has_many :state_changes, as: :stateful, dependent: :destroy
has_many :line_items, -> {
order('created_at ASC')
}, class_name: "Spree::LineItem", dependent: :destroy
}, class_name: "Spree::LineItem", inverse_of: :order, dependent: :destroy
has_many :payments, dependent: :destroy
has_many :return_authorizations, dependent: :destroy, inverse_of: :order
has_many :adjustments, -> { order "#{Spree::Adjustment.table_name}.created_at ASC" },