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

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -