class AbstractController::Testing::WithLayouts
Test rendering with layouts
¶ ↑
self._layout is used when defined
Private Class Methods
layout(formats)
click to toggle source
# File actionview/test/actionpack/abstract/abstract_controller_test.rb, line 193 def self.layout(formats) find_template(name.underscore, { formats: formats }, { _prefixes: ["layouts"] }) rescue ActionView::MissingTemplate begin find_template("application", { formats: formats }, { _prefixes: ["layouts"] }) rescue ActionView::MissingTemplate end end
Private Instance Methods
render_to_body(options = {})
click to toggle source
Calls superclass method
ActionView::Rendering#render_to_body
# File actionview/test/actionpack/abstract/abstract_controller_test.rb, line 202 def render_to_body(options = {}) options[:_layout] = options[:layout] || _default_layout({}) super end