Class: Shoppy::Inventory

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/shoppy/inventory.rb

Instance Method Summary collapse

Instance Method Details

#quantityObject

Validators



8
# File 'app/models/shoppy/inventory.rb', line 8

validates :quantity, presence: true

#variantObject

Relationships



4
# File 'app/models/shoppy/inventory.rb', line 4

belongs_to :variant

#variant_detailsObject



12
13
14
# File 'app/models/shoppy/inventory.rb', line 12

def variant_details
  "#{self.variant.name} - [Available: #{self.quantity}]"
end