mails -> mail_templates

This commit is contained in:
gregoirenovel 2017-05-27 00:54:34 +02:00
parent 07ea0ceea1
commit 07ad7b4c84
2 changed files with 6 additions and 6 deletions

View file

@ -2,7 +2,7 @@ class Admin::MailTemplatesController < AdminController
before_action :retrieve_procedure
def index
@mails = mails
@mail_templates = mail_templates
end
def edit
@ -18,7 +18,7 @@ class Admin::MailTemplatesController < AdminController
private
def mails
def mail_templates
[
@procedure.initiated_mail,
@procedure.received_mail,
@ -29,7 +29,7 @@ class Admin::MailTemplatesController < AdminController
end
def find_mail_template_by_slug(slug)
mails.find { |m| m.class.const_get(:SLUG) == slug }
mail_templates.find { |template| template.class.const_get(:SLUG) == slug }
end
def update_params

View file

@ -5,9 +5,9 @@
%tr
%th{ colspan: 2 }
Type d'email
- @mails.each do |mail|
- @mail_templates.each do |mail_template|
%tr
%td
= mail.class.const_get(:DISPLAYED_NAME)
= mail_template.class.const_get(:DISPLAYED_NAME)
%td.text-right
= link_to "Personnaliser l'e-mail", edit_admin_procedure_mail_template_path(@procedure, mail.class.const_get(:SLUG))
= link_to "Personnaliser l'e-mail", edit_admin_procedure_mail_template_path(@procedure, mail_template.class.const_get(:SLUG))