Ruby on Rails Wednesday, May 30, 2018

On 30 May 2018 at 16:03, fugee ohu <fugee279@gmail.com> wrote:
controller by POST from form with inputs for 'subject' and 'message' (message is the body)
  def mail_to_confirmed_users0 @message=params[:message] subject=params[:subject] User.where("confirmed_at is not null").each do |user| AdminGeneralMailer.mail_to_confirmed_users(user: user, subject: subject, message: @message).deliver_now end end
mailer:

  def mail_to_confirmed_users
    @user=params[:user]
    @subject=params[:subject]
    @message=params[:message]
    mail(to: @user.email, subject: @subject)
  end


And the full error message is?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/46ab16a4-553f-4337-82a0-9dcd5a0ad307%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtWVFLDdHYUHmWiJyF6L0A8Q3uK_gY67bcDxeJnSpwP6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment