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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-31 21:46:40 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-31 21:46:40 +0400
commitffe064a2c1cb831258bc1019215f2defe23e7f99 (patch)
treebb60a7c9c6ab2ba2999e1a49ec21c90b75736bb4 /app/mailers
parentcf3f22cc9961b83dc56fdb49bb6a4a8b8bb732b1 (diff)
Bit of cleanup and improving mailer
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 671483ce158..cec680bc356 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -148,12 +148,15 @@ class Notify < ActionMailer::Base
# >> @project = Project.last
# => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
# >> subject('Lorem ipsum')
- # => "GitLab | Lorem ipsum | Ruby on Rails"
+ # => "GitLab | Ruby on Rails | Lorem ipsum "
#
# # Accepts multiple arguments
# >> subject('Lorem ipsum', 'Dolor sit amet')
# => "GitLab | Lorem ipsum | Dolor sit amet"
def subject(*extra)
- "GitLab | " << extra.join(' | ') << (@project ? " | #{@project.name_with_namespace}" : "")
+ subject = "GitLab"
+ subject << (@project ? " | #{@project.name_with_namespace}" : "")
+ subject << " | " + extra.join(' | ') if extra.present?
+ subject
end
end