Template error rails 5
naveen1336 opened this issue · 4 comments
naveen1336 commented
ActionView::MissingTemplate (Missing template template_mailer/welcome_email with "mailer". Searched in:
- "template_mailer"
):
matt-riemer commented
DId you run the rake effective_email_templates:import_templates
rake task as per https://github.com/code-and-effect/effective_email_templates#creating-email-templates
naveen1336 commented
yes, i have done that but still same error
naveen1336 commented
found a different way i think liquid template is not working with rails 5.
def welcome_email(user)
@template = Liquid::Template.parse(File.read("#{Rails.root}/app/views/template_mailer/welcome_email.liquid"))
mail(to: user.email) do |format|
format.html { @template.render('adjective' => 'awesome') }
end
end
but the email send contain the --- text --- which is defied welcom.liquid file
matt-riemer commented
good find, nice!
If you want to submit a PR, I'd gladly merge it :)