]> source.dussan.org Git - redmine.git/commitdiff
Prevent clash with Rails 5.1 Mailer class.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Jun 2017 08:20:20 +0000 (08:20 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Jun 2017 08:20:20 +0000 (08:20 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16600 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mail_handler.rb
app/models/mailer.rb

index dc033de756251e641086932424c7e7e6ff4c86a2..86ad4eb278f05a1cad3a77a59e4d224a3ddd6dd1 100644 (file)
@@ -130,7 +130,7 @@ class MailHandler < ActionMailer::Base
           end
           add_user_to_group(handler_options[:default_group])
           unless handler_options[:no_account_notice]
-            Mailer.account_information(@user, @user.password).deliver
+            ::Mailer.account_information(@user, @user.password).deliver
           end
         else
           if logger
index f6b16b9f2fad90e782ddcaccfb738a5ebf8be055..838eefe5368862d4cb972fd42f692db0a62e30c4 100644 (file)
@@ -61,7 +61,7 @@ class Mailer < ActionMailer::Base
     to = issue.notified_users
     cc = issue.notified_watchers - to
     issue.each_notification(to + cc) do |users|
-      Mailer.issue_add(issue, to & users, cc & users).deliver
+      issue_add(issue, to & users, cc & users).deliver
     end
   end
 
@@ -95,7 +95,7 @@ class Mailer < ActionMailer::Base
     cc = journal.notified_watchers - to
     journal.each_notification(to + cc) do |users|
       issue.each_notification(users) do |users2|
-        Mailer.issue_edit(journal, to & users2, cc & users2).deliver
+        issue_edit(journal, to & users2, cc & users2).deliver
       end
     end
   end
@@ -317,7 +317,7 @@ class Mailer < ActionMailer::Base
     # TODO: maybe not the best way to handle this
     return if user.admin? && user.login == 'admin' && user.mail == 'admin@example.net'
 
-    Mailer.security_notification(user,
+    security_notification(user,
       message: :mail_body_password_updated,
       title: :button_change_password,
       url: {controller: 'my', action: 'password'}
@@ -359,7 +359,7 @@ class Mailer < ActionMailer::Base
     return unless changes.present?
 
     users = User.active.where(admin: true).to_a
-    Mailer.settings_updated(users, changes).deliver
+    settings_updated(users, changes).deliver
   end
 
   def test_email(user)