Class: NotifyNegativeBalanceJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/notify_negative_balance_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(ordergroup, transaction) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'app/jobs/notify_negative_balance_job.rb', line 2

def perform(ordergroup, transaction)
  ordergroup.users.each do |user|
    next unless user.settings.notify['negative_balance']

    Mailer.deliver_now_with_user_locale user do
      Mailer.negative_balance(user, transaction)
    end
  end
end