Bit of cleanup and improving mailer
This commit is contained in:
parent
cf3f22cc99
commit
ffe064a2c1
7 changed files with 16 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue