Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-05-12 18:06:14 +0300
committerSean McGivern <sean@gitlab.com>2016-05-17 15:23:17 +0300
commita9977f2b7a39d57d0633714616b4653aca103993 (patch)
tree40a8cb2fad0e80a01b056afe8be70c2b82f33b5e /app/mailers
parent28eea9bdfd0b28ad044f76bd4fcf988329ca9921 (diff)
Syntax-highlight diffs in push emails
Based on: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/projects.rb3
-rw-r--r--app/mailers/notify.rb2
2 files changed, 4 insertions, 1 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index 5489283432b..fdf1e9f5afc 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -65,7 +65,8 @@ module Emails
# used in notify layout
@target_url = @message.target_url
- @project = Project.find project_id
+ @project = Project.find(project_id)
+ @diff_notes_disabled = true
add_project_headers
headers['X-GitLab-Author'] = @message.author_username
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 826e5f96fa1..1c663bdd521 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -10,6 +10,8 @@ class Notify < BaseMailer
include Emails::Builds
add_template_helper MergeRequestsHelper
+ add_template_helper DiffHelper
+ add_template_helper BlobHelper
add_template_helper EmailsHelper
def test_email(recipient_email, subject, body)