Method: Spree::Product#find_variant_property_rule

Defined in:
app/models/spree/product.rb

#find_variant_property_rule(option_value_ids) ⇒ Spree::VariantPropertyRule

Finds the variant property rule that matches the provided option value ids.

Parameters:

  • option_value_ids (Array<Integer>)

    list of option value ids

Returns:



280
281
282
283
284
# File 'app/models/spree/product.rb', line 280

def find_variant_property_rule(option_value_ids)
  variant_property_rules.find do |rule|
    rule.matches_option_value_ids?(option_value_ids)
  end
end