From 8cd9f6d205e5db5331dd5b01be35b537da17cdee Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Fri, 7 Feb 2014 13:45:57 -0500 Subject: Introduce `render :plain` for render plain text This is as an option to render content with a content type of `text/plain`. This is the preferred option if you are planning to render a plain text content. Please see #12374 for more detail. --- actionview/lib/action_view/helpers/rendering_helper.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionview/lib/action_view/helpers') diff --git a/actionview/lib/action_view/helpers/rendering_helper.rb b/actionview/lib/action_view/helpers/rendering_helper.rb index 77d63b7f86..4eae80cd93 100644 --- a/actionview/lib/action_view/helpers/rendering_helper.rb +++ b/actionview/lib/action_view/helpers/rendering_helper.rb @@ -12,6 +12,8 @@ module ActionView # * :file - Renders an explicit template file (this used to be the old default), add :locals to pass in those. # * :inline - Renders an inline template similar to how it's done in the controller. # * :text - Renders the text passed in out. + # * :plain - Renders the text passed in out. Setting the content + # type as text/plain. # * :body - Renders the text passed in, and does not set content # type in the response. # -- cgit v1.2.3