Class: Spree::ReturnItem::ExchangeVariantEligibility::SameProduct

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/return_item/exchange_variant_eligibility/same_product.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) eligible_variants(variant, stock_locations: nil)



4
5
6
# File 'app/models/spree/return_item/exchange_variant_eligibility/same_product.rb', line 4

def self.eligible_variants(variant, stock_locations: nil)
  Spree::Variant.where(product_id: variant.product_id, is_master: variant.is_master?).in_stock(stock_locations)
end