Skip to content

Commit

Permalink
chore: subfolder for mailer views
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellberg committed Apr 8, 2024
1 parent a18e8da commit 165507a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/mailers/previews/account_mailer_preview.rb
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 165507a

Please sign in to comment.