diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2015-09-23 05:31:43 +0100 |
---|---|---|
committer | Andrew White <pixeltrix@users.noreply.github.com> | 2015-09-23 05:31:43 +0100 |
commit | ef7791ca1460fa3382778ad6c49074aa88a9c7f1 (patch) | |
tree | 231e6bca1a3a7c76f345dbb8aea2a7a318fc572a /railties | |
parent | 7c08e1ac6d4fe9952b2753cfc17bc16a6a84e14d (diff) | |
parent | 43ee2d8ce52e85c696a0b93ee1bafa13974be0d9 (diff) | |
download | rails-ef7791ca1460fa3382778ad6c49074aa88a9c7f1.tar.gz rails-ef7791ca1460fa3382778ad6c49074aa88a9c7f1.tar.bz2 rails-ef7791ca1460fa3382778ad6c49074aa88a9c7f1.zip |
Merge pull request #21723 from y-yagi/fix_deprecate_msg_in_mailers_controller
stop using deprecated method in mailers controller
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/mailers_controller.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/templates/rails/mailers/email.html.erb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/mailers_controller.rb b/railties/lib/rails/mailers_controller.rb index ed0ea9dd4d..38004fe99a 100644 --- a/railties/lib/rails/mailers_controller.rb +++ b/railties/lib/rails/mailers_controller.rb @@ -31,7 +31,7 @@ class Rails::MailersController < Rails::ApplicationController # :nodoc: raise AbstractController::ActionNotFound, "Email part '#{part_type}' not found in #{@preview.name}##{@email_action}" end else - @part = find_preferred_part(request.format, Mime::HTML, Mime::TEXT) + @part = find_preferred_part(request.format, Mime::Type[:HTML], Mime::Type[:TEXT]) render action: 'email', layout: false, formats: %w[html] end else diff --git a/railties/lib/rails/templates/rails/mailers/email.html.erb b/railties/lib/rails/templates/rails/mailers/email.html.erb index bb6e49966d..cf95cd8ad0 100644 --- a/railties/lib/rails/templates/rails/mailers/email.html.erb +++ b/railties/lib/rails/templates/rails/mailers/email.html.erb @@ -95,8 +95,8 @@ <% if @email.multipart? %> <dd> <select onchange="document.getElementsByName('messageBody')[0].src=this.options[this.selectedIndex].value;"> - <option <%= request.format == Mime::HTML ? 'selected' : '' %> value="?part=text%2Fhtml">View as HTML email</option> - <option <%= request.format == Mime::TEXT ? 'selected' : '' %> value="?part=text%2Fplain">View as plain-text email</option> + <option <%= request.format == Mime::Type[:HTML] ? 'selected' : '' %> value="?part=text%2Fhtml">View as HTML email</option> + <option <%= request.format == Mime::Type[:TEXT] ? 'selected' : '' %> value="?part=text%2Fplain">View as plain-text email</option> </select> </dd> <% end %> |