render 参数汇总与详解
ActionController::Rendering
# 渲染普通文本,不带格式
:plain
# 举例 render plain: "OK"# 渲染 html 格式的内容。不推荐使用,可用 html.erb 代替
:html
# 举例 render html: "<strong>Not Found</strong>".html_safe
# 渲染普通文本,不带格式。不推荐使用,可用 :plain 代替
:text
# 兼容废除的 :text,默认是普通文本。不推荐使用
:body
# 不渲染任何东西,已废除。不推荐使用,可用 :plain 代替
:nothing# 指定 Header status
:status
# 指定 Header content_type
:content_type
# 指定 Header location
:locationAbstractController::Rendering
ActionView::Rendering
ActionView::Renderer
ActionView::PartialRenderer
ActionView::TemplateRenderer
ActionView::Helpers::RenderingHelper
ActionController::Renderers (Metal 增强模块)
ActionController::Renderer
最后更新于