转自:http://www.rubyonrailsexamples.com/rails-tips/rails-render/
Rails Render is a strong method that helps you to render your web pages. It comes with many flavors including:
1) Render action: render an action in the current controller, you can specify if you want layout printed or not
2) Render partial: renders part of your web page
3) Render template: render a page, the file path is relative to your application
4) Render file: absolute path is needed
5) Render text
6) Render Json
Render用法:
详细解释:
Status状态参考手册:
本文详细介绍了Rails框架中Render方法的各种使用方式,包括渲染动作、部分页面、模板文件等,并解释了如何设置布局、状态码及响应类型等内容。

140

被折叠的 条评论
为什么被折叠?



