Skip to content

Commit

Permalink
Merge 9e07971 into e798437
Browse files Browse the repository at this point in the history
  • Loading branch information
hesslau committed Feb 10, 2020
2 parents e798437 + 9e07971 commit 918f246
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def contact(sender:, resource_id:, text:)
@sender = sender
@receiver = User.find resource_id
@text = text
@subject = I18n.t('email.user.contact.subject')
mail to: @receiver.email, subject: @subject
@subject = I18n.t('email.user.contact.subject', sender_name: @sender.name)
mail to: @receiver.email, subject: @subject, reply_to: @sender.email
end
end
2 changes: 1 addition & 1 deletion config/locales/old/email/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ de:
purchase_id: 'Transaktionsnummer:'
user:
contact:
subject: '[Fairmondo] ein/e Nutzer*in hat eine Frage an Dich'
subject: '[Fairmondo] %{sender_name} hat eine Frage an Dich'
text_beginning: 'hat Dir eine Frage gestellt:'

2 changes: 1 addition & 1 deletion test/mailers/user_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class UserMailerTest < ActiveSupport::TestCase
mail = UserMailer.contact(sender: sender, resource_id: receiver.id, text: text)

mail.must deliver_to receiver.email
mail.subject.must_equal('[Fairmondo] ein/e Nutzer*in hat eine Frage an Dich')
mail.subject.must_equal('[Fairmondo] #{sender.nickname} hat eine Frage an Dich')
mail.must have_body_text sender.nickname
mail.must have_body_text user_url sender.id
mail.must have_body_text sender.email
Expand Down

0 comments on commit 918f246

Please sign in to comment.