Displaying 1 result from an estimated 1 matches for "__loop".
Did you mean:
_loop
2006 May 03
2
Perplexing nested transaction issue
...of the Mail object while sending mails for
each of it''s recipients. Following is a simplified example that I''m having
problems with:
def send_mail
@mail = Mail.find params[:id]
@recipients = Recipient.find_all_by_mail_id @mail.id
processed = 0
logger.info "__Loop Start"
@recipients.each do |recipient|
recipient.status = ''ok''
logger.info "==Recipient Saved - #{recipient.save}"
@mail.status = (processed += 1)
@mail.save
logger.info "--Mail Saved"
end
logger.info "__Loop...