diff --git a/app/models/spree/option_type.rb b/app/models/spree/option_type.rb index 3c03976ec3..fe0ea71138 100644 --- a/app/models/spree/option_type.rb +++ b/app/models/spree/option_type.rb @@ -2,9 +2,9 @@ module Spree class OptionType < ApplicationRecord - has_many :products, through: :product_option_types has_many :option_values, -> { order(:position) }, dependent: :destroy has_many :product_option_types, dependent: :destroy + has_many :products, through: :product_option_types validates :name, :presentation, presence: true default_scope -> { order("#{table_name}.position") }