diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 9a23378..057ca19 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,10 @@ class ApplicationMailer < ActionMailer::Base - default from: Kiqr::Config.default_from_email + # Change the default path for mailer views + prepend_view_path "app/views/mailers" + + # Set the default layout for mailers layout "mailer" + + # Set the default from email address + default from: Kiqr::Config.default_from_email end diff --git a/app/views/account_mailer/invitation_email.text.erb b/app/views/mailers/account_mailer/invitation_email.text.erb similarity index 100% rename from app/views/account_mailer/invitation_email.text.erb rename to app/views/mailers/account_mailer/invitation_email.text.erb diff --git a/test/mailers/previews/account_mailer_preview.rb b/test/mailers/previews/account_mailer_preview.rb index 1c005d1..7630e42 100644 --- a/test/mailers/previews/account_mailer_preview.rb +++ b/test/mailers/previews/account_mailer_preview.rb @@ -1,4 +1,4 @@ -# Preview all emails at http://localhost:3000/rails/mailers/kiqr/account_mailer +# Preview all emails at http://localhost:3000/rails/mailers/account_mailer class AccountMailerPreview < ActionMailer::Preview def invitation_email AccountMailer.invitation_email(AccountInvitation.first)