命名空间
方法
包含的模块
类公共方法
new() 链接
源文件: 显示 | 在 GitHub 上
# File actionview/lib/action_view/rendering.rb, line 32 def initialize @_rendered_format = nil super end
实例公共方法
render_to_body(options = {}) 链接
源文件: 显示 | 在 GitHub 上
# File actionview/lib/action_view/rendering.rb, line 119 def render_to_body(options = {}) _process_options(options) _process_render_template_options(options) _render_template(options) end
view_context() 链接
视图类的实例。默认视图类是 ActionView::Base。
视图类必须具有以下方法
-
View.new(lookup_context, assigns, controller)— 为控制器创建一个新的ActionView实例,我们也可以传递参数。 -
View#render(option)— 返回渲染后的模板的String。
在模块中覆盖此方法以更改默认行为。
源文件: 显示 | 在 GitHub 上
# File actionview/lib/action_view/rendering.rb, line 109 def view_context view_context_class.new(lookup_context, view_assigns, self) end
view_context_class() 链接
源文件: 显示 | 在 GitHub 上
# File actionview/lib/action_view/rendering.rb, line 95 def view_context_class self.class.view_context_class end