rails Rendering Text 用法

rails5.1版本前用法:

You can send plain text – with no markup at all – back to the browser by using the :text option to render:

render :text => "OK"

rails5.1之后用法:

You can send plain text - with no markup at all - back to the browser by using the :plain option to render:

render plain: "OK"

 

posted @ 2021-01-05 15:07  wangyuyu  阅读(174)  评论(0编辑  收藏  举报