mailer wrong number of arguments

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

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

I just needed to pass a sequence of arguments in the call to the mailer from controller and match them with same sequence in parentheses next to my mailer action’s definition If you know what I mean =D