Method: Spree::Variant#on_backorder

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

#on_backorderFixnum

Counts the number of units currently on backorder for this variant.

Returns:

  • (Fixnum)


189
190
191
# File 'app/models/spree/variant.rb', line 189

def on_backorder
  inventory_units.with_state('backordered').size
end