From 79a5ea9eadb4d43b62afacedc0706cbe88c54496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sat, 21 May 2016 09:49:38 -0300 Subject: Remove deprecated support to :text in render --- actionview/lib/action_view/layouts.rb | 2 +- actionview/lib/action_view/renderer/template_renderer.rb | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'actionview/lib/action_view') 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 -- cgit v1.2.3