ruby on rails - call method from activemailer view -
ruby on rails - call method from activemailer view -
is there way phone call method actionmailer html file same way view can phone call method in controller?
actionmailer:
class modelemailermailer < actionmailer::base helper :application layout 'model_email' def user_mailer(user) ... mail(to: user.formatted_email, subject: "email subject") end def function_call(user_info) .... homecoming modified_user_info end helper_method :function_call
actionmailer view file 'model_email':
... user.each |a| modified_user_info = function_call(a) end ...
right don't error message. empty email right subject, no body.
edit 1: if can't place function in actionmailer, can create , link separate controller view?
ruby-on-rails actionmailer
Comments
Post a Comment