Class: Plugins::CamaSubscriber::PromotionItem
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Plugins::CamaSubscriber::PromotionItem
- Defined in:
- app/models/plugins/cama_subscriber/promotion_item.rb
Instance Method Summary collapse
-
#increment! ⇒ Object
scope :open, ->{ where(‘last_open_at is not null’) }.
Instance Method Details
#increment! ⇒ Object
scope :open, ->{ where(‘last_open_at is not null’) }
8 9 10 |
# File 'app/models/plugins/cama_subscriber/promotion_item.rb', line 8 def increment! self.update(qty_opened: self.qty_opened + 1) end |