Fix render option to suppress deprecation warning

> DEPRECATION WARNING: `render :text` is deprecated because it does not
> actually render a `text/plain` response. Switch to `render plain:
> 'plain text'` to render as `text/plain`, `render html:
> '<strong>HTML</strong>'` to render as `text/html`, or `render body:
> 'raw'` to match the deprecated behavior and render with the default
> Content-Type, which is `text/html`.

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-04-19 08:47:07 +09:00
parent 4fb6823669
commit fe4dd681b6

View File

@ -6,7 +6,7 @@ describe DummyController do
controller DummyController do
skip_before_action :login_required
def index
render :text => "Hello World"
render plain: "Hello World"
end
end