diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-08-06 11:25:11 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-08-06 11:25:11 -0300 |
commit | f052e4ae58c7f4dddc6604cde28e224e9b696664 (patch) | |
tree | 44d36a7bacf73147433345d41f3951c02b3a1fb2 /railties | |
parent | 3a4b4559ea7928772e60662036ae4dab88d187c7 (diff) | |
parent | 35a734d671b023cfe6a3298088bb18e009ad9bd7 (diff) | |
download | rails-f052e4ae58c7f4dddc6604cde28e224e9b696664.tar.gz rails-f052e4ae58c7f4dddc6604cde28e224e9b696664.tar.bz2 rails-f052e4ae58c7f4dddc6604cde28e224e9b696664.zip |
Merge pull request #21137 from y-yagi/fix_deprecation_warning
stop using deprecated `render :text` in railties
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application_controller.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/mailers_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/application_controller.rb b/railties/lib/rails/application_controller.rb index 9a29ec21cf..618a09a5b3 100644 --- a/railties/lib/rails/application_controller.rb +++ b/railties/lib/rails/application_controller.rb @@ -6,7 +6,7 @@ class Rails::ApplicationController < ActionController::Base # :nodoc: def require_local! unless local_request? - render text: '<p>For security purposes, this information is only available to local requests.</p>', status: :forbidden + render html: '<p>For security purposes, this information is only available to local requests.</p>'.html_safe, status: :forbidden end end diff --git a/railties/lib/rails/mailers_controller.rb b/railties/lib/rails/mailers_controller.rb index 41422a656c..78a857e0f1 100644 --- a/railties/lib/rails/mailers_controller.rb +++ b/railties/lib/rails/mailers_controller.rb @@ -26,7 +26,7 @@ class Rails::MailersController < Rails::ApplicationController # :nodoc: if part = find_part(part_type) response.content_type = part_type - render text: part.respond_to?(:decoded) ? part.decoded : part + render plain: part.respond_to?(:decoded) ? part.decoded : part else raise AbstractController::ActionNotFound, "Email part '#{part_type}' not found in #{@preview.name}##{@email_action}" end |