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"

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-08-08
猜你喜欢
  • 2022-12-23
  • 2021-09-14
  • 2021-08-16
  • 2021-05-17
  • 2022-12-23
  • 2021-11-01
  • 2021-12-28
相关资源
相似解决方案