diff options
author | Prem Sichanugrist <s@sikac.hu> | 2014-02-07 13:45:57 -0500 |
---|---|---|
committer | Prem Sichanugrist <s@sikac.hu> | 2014-02-18 12:08:36 -0500 |
commit | 8cd9f6d205e5db5331dd5b01be35b537da17cdee (patch) | |
tree | 63de043c2a65cddf20105e608ea60af1a1e65e20 /actionview/lib/action_view/helpers | |
parent | 9e9cc660773d331b04a829b4a727af70b3e23c16 (diff) | |
download | rails-8cd9f6d205e5db5331dd5b01be35b537da17cdee.tar.gz rails-8cd9f6d205e5db5331dd5b01be35b537da17cdee.tar.bz2 rails-8cd9f6d205e5db5331dd5b01be35b537da17cdee.zip |
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.
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r-- | actionview/lib/action_view/helpers/rendering_helper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 # * <tt>:file</tt> - Renders an explicit template file (this used to be the old default), add :locals to pass in those. # * <tt>:inline</tt> - Renders an inline template similar to how it's done in the controller. # * <tt>:text</tt> - Renders the text passed in out. + # * <tt>:plain</tt> - Renders the text passed in out. Setting the content + # type as <tt>text/plain</tt>. # * <tt>:body</tt> - Renders the text passed in, and does not set content # type in the response. # |