Commit 7b2fe263 authored by Tugce Nur Tas's avatar Tugce Nur Tas
Browse files

provide app url variable for email templates

parent 1502d90c
Pipeline #30727 passed with stage
in 36 minutes and 41 seconds
...@@ -7,7 +7,8 @@ class ReminderMailing < ApplicationRecord ...@@ -7,7 +7,8 @@ class ReminderMailing < ApplicationRecord
:Einsatz, :Einsatz,
:EinsatzStart, :EinsatzStart,
:FeedbackLink, :FeedbackLink,
:EmailAbsender :EmailAbsender,
:OnlinePlattformUrl
].freeze ].freeze
belongs_to :creator, -> { with_deleted }, class_name: 'User', inverse_of: 'reminder_mailings' belongs_to :creator, -> { with_deleted }, class_name: 'User', inverse_of: 'reminder_mailings'
......
...@@ -121,4 +121,8 @@ class ReminderMailingVolunteer < ApplicationRecord ...@@ -121,4 +121,8 @@ class ReminderMailingVolunteer < ApplicationRecord
def feedback_link def feedback_link
"[Halbjahres-Rapport erstellen](#{feedback_url})" "[Halbjahres-Rapport erstellen](#{feedback_url})"
end end
def online_plattform_url
"[Online-Plattform Url](#{Rails.application.routes.url_helpers.root_path})"
end
end end
...@@ -19,7 +19,8 @@ class SemesterProcessMail < ApplicationRecord ...@@ -19,7 +19,8 @@ class SemesterProcessMail < ApplicationRecord
:Einsatz, :Einsatz,
:FeedbackLink, :FeedbackLink,
:EmailAbsender, :EmailAbsender,
:Semester :Semester,
:OnlinePlattformUrl
].freeze ].freeze
def self.template_varnames def self.template_varnames
...@@ -87,6 +88,10 @@ class SemesterProcessMail < ApplicationRecord ...@@ -87,6 +88,10 @@ class SemesterProcessMail < ApplicationRecord
) )
end end
def online_plattform_url
"[Online-Plattform Url](#{Rails.application.routes.url_helpers.root_path})"
end
private private
def send_email def send_email
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment