Displaying 1 result from an estimated 1 matches for "subscription_recipients".
2009 Dec 21
2
Multiple email recipients
I''m trying to call multiple email addresses from database. But dont
know how to get the logic into the recipients field.
#subscriptions_controller
def deliver
@subscription = Subscription.find(params[:id])
@users = @subscription.users
@subscription_recipients = @users.find(:all).collect { |user|
user.email }
@subscription.deliver
flash[:notice] = "Delivered Subscription"
redirect_to subscriptions_url
end
#subscription.rb
def deliver
UserMailer.deliver_lotto_saturday_subscription(@user, @subscription)
update_attribute(:schedu...