2

Rails version: 5.0.2 haml-rails: 1.0.0

This was working prior to the Rails 4.2 => 5.0.2 upgrade. I have a mailer class:

app/mailers/password_mailer.rb

class PasswordMailer < ActionMailer::Base

  default :from => ENV['ORG_FROM_EMAIL'] ||= "admin@example.com"

  def password_reset(user)
    @user = user
    mail :to => user.email, :subject => "Password Reset"
  end

end

app/views/password_mailer/password_reset.html.haml

= "Hi, #{@user.name} -"

%p
  We received a request to reset your password.
%p
  = link_to('Click here to reset', edit_admin_password_reset_url(@user.password_reset_token))

And I call it using this:

PasswordMailer.password_reset(self).deliver_now

I now get:

ActionView::MissingTemplate - Missing template password_mailer/password_reset with "mailer". Searched in:
  * "password_mailer"

Is there a naming convention I'm missing with HAML mailer templates? Is this a layout issue? Thanks for any guidance.

Brit200313
  • 728
  • 5
  • 20

1 Answers1

0

This is ended up being an issue where the CMS we are using was only loading the view path of the CMS. Case closed.

Brit200313
  • 728
  • 5
  • 20