Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailer layout proc should be in application.rb #2

Open
rjpaskin opened this issue Jun 7, 2016 · 1 comment
Open

Mailer layout proc should be in application.rb #2

rjpaskin opened this issue Jun 7, 2016 · 1 comment

Comments

@rjpaskin
Copy link

rjpaskin commented Jun 7, 2016

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
@nicalpi
Copy link
Member

nicalpi commented Jun 7, 2016

👍 Happy to review a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants