命名空間
方法
包含模組
類別公開方法
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(選項)
— 傳回使用已呈現範本的字串
。
在模組中覆寫此方法以變更預設行為。
來源: 顯示 | 在 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