mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
13 lines
363 B
Ruby
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
|