app/models/spree/product_decorator.rb
# Essentially all read values here are delegated to reading the value on the Master variant
# All write values will write to all variants (including the Master) unless that method's all_variants parameter is set to false, in which case it will only write to the Master variant
Essentially all read values here are delegated to reading the value on the Master variant
All write values will write to all variants (including the Master) unless that method's all_variants parameter is set to false, in which case it will only write to the Master variant
Essentially all read values here are delegated to reading the value on the Master variant All write values will write to all variants ( including the Master ) unless that method ' s all_variants parameter is set to false in which case it will only write to the Master variant
def run_on_variants(all_variants, &block)
    if all_variants && variants.present?
      variants.each { |v| block.call v }
    end
    block.call master
  end
def run_on_variants ( all_variants , & block ) if all_variants && variants . present? variants . each { | v | block . call v } end block . call master end
Essentially all read values here are delegated to reading the value on the Master variant
All write values will write to all variants (including the Master) unless that method's all_variants parameter is set to false, in which case it will only write to the Master variant
Essentially all read values here are delegated to reading the value on the Master variant All write values will write to all variants ( including the Master ) unless that method ' s all_variants parameter is set to false in which case it will only write to the Master variant
all_variants
<not_specific>
block
<not_specific>