VariantPropertyRule (spree/variant_property_rule.rb)

solidus · core/app/models/spree/variant_property_rule.rb · ruby · BSD-3-Clause
pos

frozen_string_literal: true The reason for variant properties not being associated with variants (either directly or through an association table) is performance. Variant properties are intended to be applied to a group of variants based on their option values. If there were thou

# Source: https://github.com/solidusio/solidus | License: BSD-3-Clause | Copyright 2007-2014, Spree Commerce Inc. and other contributors
# Provided via justclaw.it.com; keep this notice with the code.
# frozen_string_literal: true

# The reason for variant properties not being associated with variants
# (either directly or through an association table) is performance.
#
# Variant properties are intended to be applied to a group of variants based
# on their option values. If there were thousands of variants that shared the
# same option value, attempting to associate a variant property with that
# group of variants would be problematic in terms of performance.
#
# An added benefit to this approach is not having to associate existing variant
# properties with newly created variants. If the v

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key