Send to multiple recipients in Rails with ActionMailer
问题 I'm trying to send multiple emails based on a boolean value in my database. The app is a simple scheduling app and user can mark their shift as "replacement_needed" and this should send out emails to all the users who've requested to receive these emails. Trouble is, it only every seems to send to one email. Here's my current code: def request_replacement(shift) @shift = shift @user = shift.user @recipients = User.where(:replacement_emails => true).all @url = root_url @recipients.each do |r|