You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i think this might be something basic that i am not understanding.
I got a mailer like this:
classOrderMailer < ApplicationMailerlayout'mjml_layout'defcreated# some logic heremail(to: emails,subject: '')end
...
# like the created method i got another 5 methods
...
# i want another layout heredefanother_method# some logicmail(to: emails,subject: '')do |format|
format.mjml{render: 'new_mjml_layout}endendend
This is not working. Clearly i am doing something wrong. I want to only override the general mjml_layout for the one method, in this example the another_method.
I tried overriding the general layout like a controller using 'new_mjml_layout', only: [:another_method] and 'mjml_layout', except: [:another_method] but that didn't work either.
What am i doing wrong? This is no how it works? This just can't be done?
The text was updated successfully, but these errors were encountered:
Hello, i think this might be something basic that i am not understanding.
I got a mailer like this:
This is not working. Clearly i am doing something wrong. I want to only override the general
mjml_layout
for the one method, in this example theanother_method
.I tried overriding the general layout like a controller using
'new_mjml_layout', only: [:another_method]
and'mjml_layout', except: [:another_method]
but that didn't work either.What am i doing wrong? This is no how it works? This just can't be done?
The text was updated successfully, but these errors were encountered: