Displaying 1 result from an estimated 1 matches for "subscriptions_url".
2009 Dec 21
2
Multiple email recipients
...#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(:schedule_delivery, Time.now)
end
#user_mailer.rb
class UserMailer < ActionMailer ::Base
def lotto_saturday_subscription(user, subscription)
@recipients = ????????...