Files
openfoodnetwork/app/models/spree/option_value.rb
2020-11-04 12:15:23 +00:00

13 lines
363 B
Ruby

# frozen_string_literal: true
module Spree
class OptionValue < ActiveRecord::Base
belongs_to :option_type
acts_as_list scope: :option_type
has_and_belongs_to_many :variants, join_table: 'spree_option_values_variants',
class_name: "Spree::Variant"
validates :name, :presentation, presence: true
end
end