Open lucasmello opened 4 months ago
@lucasmello How is your controller setup? My controller/view works for both mjml
and mrml
:
def email
@issue = Issue.find(params[:issue_id])
respond_to do |format|
format.html { render :layout => 'email' }
format.text { render :layout => false }
format.mjml { render :layout => false }
end
end
@sighmon thanks for the reply, and sorry for the delay in replying back!
I'm using it on the notifier.rb
:
def existing_user_invitation(user)
mail(
to: user.email,
from: "my@email.com",
subject: "Invitation to Join Account"
) do |format|
format.mjml
end
end
@lucasmello Would you mind creating a sample project showing your bug?
@lucasmello I happened to come across the same error in our codebase. I think ERB is getting skipped. If you rename my_template.mjml
to my_template.mjml.erb
it probably works.
I'm trying to use
mjml-rails
along withmrml
and I'm not being able to make it work. I added themrml
gem as well as setuse_mrml = true
in the initializer. The issue is my template has Ruby code. If I remove the Ruby code, it works fine.Steps to reproduce
Just try to render a template like:
The error is:
MRML::Error: unable to load included template
This WORKS with
mjml
, but not withmrml
.