mailers: add preview URL to all previewable mailers

This commit is contained in:
Pierre de La Morinerie 2018-11-20 10:57:51 +00:00 committed by gregoirenovel
parent f2eaf66a9a
commit a5f9be00e0
11 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/administrateur_mailer
class AdministrateurMailer < ApplicationMailer
layout 'mailers/layout'

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/administration_mailer
class AdministrationMailer < ApplicationMailer
layout 'mailers/layout'

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/avis_mailer
class AvisMailer < ApplicationMailer
def avis_invitation(avis)
@avis = avis

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/devise_user_mailer
class DeviseUserMailer < Devise::Mailer
helper :application # gives access to all helpers defined within `application_helper`.
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/dossier_mailer
class DossierMailer < ApplicationMailer
layout 'mailers/layout'

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/gestionnaire_mailer
class GestionnaireMailer < ApplicationMailer
layout 'mailers/layout'

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/invite_mailer
class InviteMailer < ApplicationMailer
def invite_user(invite)
subject = "Participez à l'élaboration d'un dossier"

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/new_attestation_mailer
class NewAttestationMailer < ApplicationMailer
include Rails.application.routes.url_helpers

View file

@ -1,7 +1,10 @@
# Preview all emails at http://localhost:3000/rails/mailers/notification_mailer
# A Notification is attached as a Comment to the relevant discussion,
# then sent by email to the user.
#
# The subject and body of a Notification can be customized by each demarche.
#
class NotificationMailer < ApplicationMailer
def send_dossier_received(dossier)
send_notification(dossier, dossier.procedure.received_mail_template)

View file

@ -1,3 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
class UserMailer < ApplicationMailer
layout 'mailers/layout'

View file

@ -1,4 +1,4 @@
class UserPreview < ActionMailer::Preview
class UserMailerPreview < ActionMailer::Preview
def new_account_warning
UserMailer.new_account_warning(User.first)
end