search for: find_all_by_mail_id

Displaying 1 result from an estimated 1 matches for "find_all_by_mail_id".

2006 May 03
2
Perplexing nested transaction issue
...ts Recipients belong_to :mail I''d like to update the status 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 "...