Method: Spree::LineItem#variant

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

#variantSpree::Variant?

Note:

This will return the variant even if it has been deleted.

Returns the variant associated with this line item, if there is one.

Returns:

  • (Spree::Variant, nil)

    the variant associated with this line item, if there is one



127
128
129
# File 'app/models/spree/line_item.rb', line 127

def variant
  Spree::Variant.unscoped { super }
end