diff --git a/app/models/spree/product_decorator.rb b/app/models/spree/product_decorator.rb index 0ba0a0d..91bedd9 100644 --- a/app/models/spree/product_decorator.rb +++ b/app/models/spree/product_decorator.rb @@ -4,7 +4,7 @@ module Spree module ProductDecorator def self.prepended(base) base.has_many :relations, -> { order(:position) }, class_name: 'Spree::Relation', as: :relatable - base.has_many :relation_types, -> { distinct }, class_name: 'Spree::RelationType', through: :relations + base.has_many :relation_types, -> { distinct.reorder(nil) }, class_name: 'Spree::RelationType', through: :relations # When a Spree::Product is destroyed, we also want to destroy all # Spree::Relations "from" it as well as "to" it.