mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix Order line items association definition
Populating the cart was throwing an "Association Mismatch" error D:
This commit is contained in:
@@ -35,7 +35,7 @@ module Spree
|
||||
alias_attribute :shipping_address, :ship_address
|
||||
|
||||
has_many :state_changes, as: :stateful
|
||||
has_many :line_items, -> { order('created_at ASC') }, dependent: :destroy
|
||||
has_many :line_items, -> { order('created_at ASC') }, class_name: "Spree::LineItem", 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" },
|
||||
|
||||
Reference in New Issue
Block a user