mails -> mail_templates
This commit is contained in:
parent
07ea0ceea1
commit
07ad7b4c84
2 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue