hebillas icon indicating copy to clipboard operation
hebillas copied to clipboard

Mailer layout proc should be in application.rb

Open rjpaskin opened this issue 8 years ago • 1 comments

The following fragment should be moved from config/environments/development.rb to config/application.rb - so that's it used in all environments - and not just development:

# Use email template for emails except on devise mails sent for admin users
config.to_prepare do
  ActionMailer::Base.layout proc { |mailer|
    if mailer.is_a?(Devise::Mailer) && mailer.scope_name == :admin_user
      nil
    else
      "email"
    end
  }
end

rjpaskin avatar Jun 07 '16 09:06 rjpaskin

👍 Happy to review a PR

nicalpi avatar Jun 07 '16 20:06 nicalpi