Class: NotifyFinishedOrderJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- NotifyFinishedOrderJob
- Defined in:
- app/jobs/notify_finished_order_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(order) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/jobs/notify_finished_order_job.rb', line 2 def perform(order) order.group_orders.each do |group_order| next unless group_order.ordergroup group_order.ordergroup.users.each do |user| next unless user.settings.notify['order_finished'] Mailer.deliver_now_with_user_locale user do Mailer.order_result(user, group_order) end end end end |