Class: Shoppy::Inventory
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Shoppy::Inventory
- Defined in:
- app/models/shoppy/inventory.rb
Instance Method Summary collapse
-
#quantity ⇒ Object
Validators.
-
#variant ⇒ Object
Relationships.
- #variant_details ⇒ Object
Instance Method Details
#quantity ⇒ Object
Validators
8 |
# File 'app/models/shoppy/inventory.rb', line 8 validates :quantity, presence: true |
#variant ⇒ Object
Relationships
4 |
# File 'app/models/shoppy/inventory.rb', line 4 belongs_to :variant |
#variant_details ⇒ Object
12 13 14 |
# File 'app/models/shoppy/inventory.rb', line 12 def variant_details "#{self.variant.name} - [Available: #{self.quantity}]" end |