Class: Order
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Order
- Defined in:
- app/models/order.rb
Instance Method Summary collapse
Instance Method Details
#acknowledge ⇒ Object
METHODS
7 8 9 |
# File 'app/models/order.rb', line 7 def acknowledge Orders::AcknowledgeWorker.perform_async id end |
#acknowledged! ⇒ Object
11 12 13 |
# File 'app/models/order.rb', line 11 def acknowledged! update_attribute(:acknowledged, true) end |
#complete ⇒ Object
15 16 17 18 19 20 |
# File 'app/models/order.rb', line 15 def complete return if complete? update_attribute(:complete, true) Orders::CompleteWorker.perform_async id end |
#perform ⇒ Object
22 23 24 |
# File 'app/models/order.rb', line 22 def perform "orders/#{keyword}_worker".camelize.constantize.perform_async(id) end |