From fc781102978364e88f789c8abd17469764cf21af Mon Sep 17 00:00:00 2001 From: Satoshi Haramura Date: Sun, 10 Jul 2022 00:36:46 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=83=B3=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E6=99=82=E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=E3=81=AE?= =?UTF-8?q?=E6=96=87=E8=A8=80=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/mailers/notification_mailer.rb | 8 ++++++++ app/views/notification_mailer/signed_up.html.slim | 1 + 2 files changed, 9 insertions(+) create mode 100644 app/views/notification_mailer/signed_up.html.slim diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index 8207710d199..71ca12fa576 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -176,4 +176,12 @@ def hibernated subject = "[FBC] #{@sender.login_name}さんが休会しました。" mail to: @user.email, subject: subject end + + # required params: sender, receiver + def signed_up + @user = @receiver + @notification = @user.notifications.find_by(link: "/users/#{@sender.id}", kind: Notification.kinds[:signed_up]) + subject = "[FBC] #{@sender.login_name}さんが新しく入会しました!" + mail to: @user.email, subject: subject + end end diff --git a/app/views/notification_mailer/signed_up.html.slim b/app/views/notification_mailer/signed_up.html.slim new file mode 100644 index 00000000000..ca46b34dc39 --- /dev/null +++ b/app/views/notification_mailer/signed_up.html.slim @@ -0,0 +1 @@ += render 'notification_mailer_template', title: "#{@sender.login_name}さんが新しく入会しました!", link_url: notification_url(@notification), link_text: "#{@sender.login_name}さんのページへ"