From 07ad7b4c84e5d65c367508f1b441c8e504ca2ea6 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Sat, 27 May 2017 00:54:34 +0200 Subject: [PATCH] mails -> mail_templates --- app/controllers/admin/mail_templates_controller.rb | 6 +++--- app/views/admin/mail_templates/index.html.haml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/admin/mail_templates_controller.rb b/app/controllers/admin/mail_templates_controller.rb index 76766c526..252884342 100644 --- a/app/controllers/admin/mail_templates_controller.rb +++ b/app/controllers/admin/mail_templates_controller.rb @@ -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 diff --git a/app/views/admin/mail_templates/index.html.haml b/app/views/admin/mail_templates/index.html.haml index 695f4e304..32deb0a28 100644 --- a/app/views/admin/mail_templates/index.html.haml +++ b/app/views/admin/mail_templates/index.html.haml @@ -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))