Skip to content

Commit 66076f3

Browse files
authored
Merge pull request rails#27258 from y-yagi/stop_using_removed_render_text
stop using removed `render :text`
2 parents 26ea54a + d71f289 commit 66076f3

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

actionpack/test/dispatch/routing/ipv6_redirect_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class IPv6IntegrationTest < ActionDispatch::IntegrationTest
77
class ::BadRouteRequestController < ActionController::Base
88
include Routes.url_helpers
99
def index
10-
render text: foo_path
10+
render plain: foo_path
1111
end
1212

1313
def foo

actionview/test/ujs/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def echo
9696

9797
render html: html.html_safe
9898
else
99-
render text: "ERROR: #{request.path} requested without ajax", status: 404
99+
render plain: "ERROR: #{request.path} requested without ajax", status: 404
100100
end
101101
end
102102
end

activesupport/lib/active_support/notifications.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module ActiveSupport
1313
# To instrument an event you just need to do:
1414
#
1515
# ActiveSupport::Notifications.instrument('render', extra: :information) do
16-
# render text: 'Foo'
16+
# render plain: 'Foo'
1717
# end
1818
#
1919
# That first executes the block and then notifies all subscribers once done.
@@ -48,7 +48,7 @@ module ActiveSupport
4848
# The block is saved and will be called whenever someone instruments "render":
4949
#
5050
# ActiveSupport::Notifications.instrument('render', extra: :information) do
51-
# render text: 'Foo'
51+
# render plain: 'Foo'
5252
# end
5353
#
5454
# event = events.first

guides/source/action_mailer_basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ class UserMailer < ApplicationMailer
400400
mail(to: @user.email,
401401
subject: 'Welcome to My Awesome Site') do |format|
402402
format.html { render 'another_template' }
403-
format.text { render text: 'Render text' }
403+
format.text { render plain: 'Render text' }
404404
end
405405
end
406406
end

0 commit comments

Comments
 (0)