class RenderBody::WithLayoutController
Public Instance Methods
custom_code()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 34 def custom_code render body: "hello world", status: 404 end
index()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 30 def index render body: "hello david" end
with_custom_code_as_string()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 38 def with_custom_code_as_string render body: "hello world", status: "404 Not Found" end
with_custom_content_type()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 70 def with_custom_content_type response.headers["Content-Type"] = "application/json" render body: '["troll","face"]' end
with_custom_layout()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 66 def with_custom_layout render body: "hello world", layout: "greetings" end
with_false()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 50 def with_false render body: false end
with_ivar_in_layout()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 75 def with_ivar_in_layout @ivar = "hello world" render body: "hello world", layout: "ivar" end
with_layout_false()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 58 def with_layout_false render body: "hello world", layout: false end
with_layout_nil()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 62 def with_layout_nil render body: "hello world", layout: nil end
with_layout_true()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 54 def with_layout_true render body: "hello world", layout: true end
with_nil()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 42 def with_nil render body: nil end
with_nil_and_status()
click to toggle source
# File actionpack/test/controller/new_base/render_body_test.rb, line 46 def with_nil_and_status render body: nil, status: 403 end