Class: Piggybak::Sellable
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Piggybak::Sellable
- Defined in:
- app/models/piggybak/sellable.rb
Instance Method Summary collapse
Instance Method Details
#admin_label ⇒ Object
12 13 14 |
# File 'app/models/piggybak/sellable.rb', line 12 def admin_label self.description end |
#update_inventory(purchased) ⇒ Object
16 17 18 |
# File 'app/models/piggybak/sellable.rb', line 16 def update_inventory(purchased) self.update_attribute(:quantity, self.quantity + purchased) end |