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
The following fragment should be moved from
config/environments/development.rb
toconfig/application.rb
- so that's it used in all environments - and not just development: