aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-05-21 09:49:38 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-10-10 00:02:52 -0300
commit79a5ea9eadb4d43b62afacedc0706cbe88c54496 (patch)
tree0f4cd12777911bff6f3019c1707ac1ec558e2c46 /actionview
parent57e1c99a280bdc1b324936a690350320a1cd8111 (diff)
downloadrails-79a5ea9eadb4d43b62afacedc0706cbe88c54496.tar.gz
rails-79a5ea9eadb4d43b62afacedc0706cbe88c54496.tar.bz2
rails-79a5ea9eadb4d43b62afacedc0706cbe88c54496.zip
Remove deprecated support to :text in render
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/layouts.rb2
-rw-r--r--actionview/lib/action_view/renderer/template_renderer.rb4
-rw-r--r--actionview/test/template/log_subscriber_test.rb2
-rw-r--r--actionview/test/template/test_case_test.rb2
4 files changed, 4 insertions, 6 deletions
diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb
index 344893f41a..b083de1396 100644
--- a/actionview/lib/action_view/layouts.rb
+++ b/actionview/lib/action_view/layouts.rb
@@ -426,7 +426,7 @@ module ActionView
end
def _include_layout?(options)
- (options.keys & [:body, :text, :plain, :html, :inline, :partial]).empty? || options.key?(:layout)
+ (options.keys & [:body, :plain, :html, :inline, :partial]).empty? || options.key?(:layout)
end
end
end
diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb
index 4bcf009e27..f40bf8f6e2 100644
--- a/actionview/lib/action_view/renderer/template_renderer.rb
+++ b/actionview/lib/action_view/renderer/template_renderer.rb
@@ -22,8 +22,6 @@ module ActionView
if options.key?(:body)
Template::Text.new(options[:body])
- elsif options.key?(:text)
- Template::Text.new(options[:text], formats.first)
elsif options.key?(:plain)
Template::Text.new(options[:plain])
elsif options.key?(:html)
@@ -40,7 +38,7 @@ module ActionView
find_template(options[:template], options[:prefixes], false, keys, @details)
end
else
- raise ArgumentError, "You invoked render but did not give any of :partial, :template, :inline, :file, :plain, :html, :text or :body option."
+ raise ArgumentError, "You invoked render but did not give any of :partial, :template, :inline, :file, :plain, :html or :body option."
end
end
diff --git a/actionview/test/template/log_subscriber_test.rb b/actionview/test/template/log_subscriber_test.rb
index ece059484c..7f358add7e 100644
--- a/actionview/test/template/log_subscriber_test.rb
+++ b/actionview/test/template/log_subscriber_test.rb
@@ -55,7 +55,7 @@ class AVLogSubscriberTest < ActiveSupport::TestCase
def test_render_text_template
Rails.stub(:root, File.expand_path(FIXTURE_LOAD_PATH)) do
- @view.render(text: "TEXT")
+ @view.render(plain: "TEXT")
wait
assert_equal 2, @logger.logged(:info).size
diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb
index 3f51636603..41225000f0 100644
--- a/actionview/test/template/test_case_test.rb
+++ b/actionview/test/template/test_case_test.rb
@@ -285,7 +285,7 @@ module ActionView
class AssertionsTest < ActionView::TestCase
def render_from_helper
form_tag("/foo") do
- safe_concat render(text: "<ul><li>foo</li></ul>")
+ safe_concat render(plain: "<ul><li>foo</li></ul>")
end
end
helper_method :render_from_helper