summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-07 09:45:06 +0000
committerRémy Coutable <remy@rymai.me>2016-11-07 09:45:06 +0000
commite656937b6e26f7139c83cc56ec3a0606bb941fe1 (patch)
treea8ef4248b879c6e795337cb4317daadc9a65f3b6
parent9c00e76567e0e6a02f7553bcf5311a3e43623c73 (diff)
parent2b4700b2bee77ef03db53aa06579fd73b242bbe7 (diff)
downloadgitlab-ce-e656937b6e26f7139c83cc56ec3a0606bb941fe1.tar.gz
Merge branch 'use_helper_method' into 'master'
Use method helper instead of add_template_helper On my opinion, better to use method `helper` instead of `add_template_helper`. Maybe there is reason doing it here. could you please explain if yes? Thanks! See merge request !7315
-rw-r--r--app/mailers/base_mailer.rb4
-rw-r--r--app/mailers/notify.rb12
2 files changed, 8 insertions, 8 deletions
diff --git a/app/mailers/base_mailer.rb b/app/mailers/base_mailer.rb
index 61a574d3dc0..79c3c2e62c5 100644
--- a/app/mailers/base_mailer.rb
+++ b/app/mailers/base_mailer.rb
@@ -1,6 +1,6 @@
class BaseMailer < ActionMailer::Base
- add_template_helper ApplicationHelper
- add_template_helper GitlabMarkdownHelper
+ helper ApplicationHelper
+ helper GitlabMarkdownHelper
attr_accessor :current_user
helper_method :current_user, :can?
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index eca6ec29767..0bc1c19e9cd 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -10,12 +10,12 @@ class Notify < BaseMailer
include Emails::Pipelines
include Emails::Members
- add_template_helper MergeRequestsHelper
- add_template_helper DiffHelper
- add_template_helper BlobHelper
- add_template_helper EmailsHelper
- add_template_helper MembersHelper
- add_template_helper GitlabRoutingHelper
+ helper MergeRequestsHelper
+ helper DiffHelper
+ helper BlobHelper
+ helper EmailsHelper
+ helper MembersHelper
+ helper GitlabRoutingHelper
def test_email(recipient_email, subject, body)
mail(to: recipient_email,