From d862843c9d58461fbdaa0f50e8a80197462a01b6 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Mar 2012 12:38:34 +0000 Subject: Renamed Mailer#test to Mailer#test_email. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9080 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/admin_controller.rb | 2 +- app/models/mailer.rb | 4 ++-- app/views/mailer/test.html.erb | 2 -- app/views/mailer/test.text.erb | 2 -- app/views/mailer/test_email.html.erb | 2 ++ app/views/mailer/test_email.text.erb | 2 ++ 6 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 app/views/mailer/test.html.erb delete mode 100644 app/views/mailer/test.text.erb create mode 100644 app/views/mailer/test_email.html.erb create mode 100644 app/views/mailer/test_email.text.erb (limited to 'app') diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index dd3e91236..9684f5cbf 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -63,7 +63,7 @@ class AdminController < ApplicationController # Force ActionMailer to raise delivery errors so we can catch it ActionMailer::Base.raise_delivery_errors = true begin - @test = Mailer.deliver_test(User.current) + @test = Mailer.deliver_test_email(User.current) flash[:notice] = l(:notice_email_sent, User.current.mail) rescue Exception => e flash[:error] = l(:notice_email_error, e.message) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 2502ce2e0..e54170604 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -290,12 +290,12 @@ class Mailer < ActionMailer::Base render_multipart('register', body) end - def test(user) + def test_email(user) set_language_if_valid(user.language) recipients user.mail subject 'Redmine test' body :url => url_for(:controller => 'welcome') - render_multipart('test', body) + render_multipart('test_email', body) end # Overrides default deliver! method to prevent from sending an email diff --git a/app/views/mailer/test.html.erb b/app/views/mailer/test.html.erb deleted file mode 100644 index 1e81b3bfe..000000000 --- a/app/views/mailer/test.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -

This is a test email sent by Redmine.
-Redmine URL: <%= link_to h(@url), @url %>

diff --git a/app/views/mailer/test.text.erb b/app/views/mailer/test.text.erb deleted file mode 100644 index 790d6ab22..000000000 --- a/app/views/mailer/test.text.erb +++ /dev/null @@ -1,2 +0,0 @@ -This is a test email sent by Redmine. -Redmine URL: <%= @url %> diff --git a/app/views/mailer/test_email.html.erb b/app/views/mailer/test_email.html.erb new file mode 100644 index 000000000..1e81b3bfe --- /dev/null +++ b/app/views/mailer/test_email.html.erb @@ -0,0 +1,2 @@ +

This is a test email sent by Redmine.
+Redmine URL: <%= link_to h(@url), @url %>

diff --git a/app/views/mailer/test_email.text.erb b/app/views/mailer/test_email.text.erb new file mode 100644 index 000000000..790d6ab22 --- /dev/null +++ b/app/views/mailer/test_email.text.erb @@ -0,0 +1,2 @@ +This is a test email sent by Redmine. +Redmine URL: <%= @url %> -- cgit v1.2.3