Aggiunge i tornei con hub, pagina pubblica e tabellone per semifinali e finali.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
module Tournaments
|
||||
class InvitationMailer < ApplicationMailer
|
||||
default from: -> { MatchLiveTv.mail_from }
|
||||
|
||||
def transmission_invite(tournament:, invitation:, invite_url:, invited_by:, body_html: nil)
|
||||
@tournament = tournament
|
||||
@club = tournament.club
|
||||
@invitation = invitation
|
||||
@invite_url = invite_url
|
||||
@invited_by = invited_by
|
||||
@expires_on = I18n.l(invitation.expires_at.to_date, format: :long)
|
||||
@body_html = body_html.presence || invitation.email_html.presence
|
||||
@body_text = ActionController::Base.helpers.strip_tags(@body_html.to_s).squish
|
||||
|
||||
I18n.with_locale(I18n.locale) do
|
||||
mail(
|
||||
to: invitation.email,
|
||||
subject: t(
|
||||
"mailers.tournament_invite.subject",
|
||||
tournament: @tournament.name,
|
||||
club: @club.name
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user