From 2f7c5f84e4834e49001ed565cfe45f14e120613f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 22 May 2005 11:07:09 +0000 Subject: Cure some ills discovered with the refactoring git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/action_controller/deprecated_renders_and_redirects.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/deprecated_renders_and_redirects.rb') diff --git a/actionpack/lib/action_controller/deprecated_renders_and_redirects.rb b/actionpack/lib/action_controller/deprecated_renders_and_redirects.rb index a511656c1e..c38d489a4e 100644 --- a/actionpack/lib/action_controller/deprecated_renders_and_redirects.rb +++ b/actionpack/lib/action_controller/deprecated_renders_and_redirects.rb @@ -26,7 +26,7 @@ module ActionController # considerably faster than rendering through the template engine. # Use block for response body if provided (useful for deferred rendering or streaming output). def render_text(text = nil, status = nil) #:doc: - render(:text => text, :status => status) { yield } + render :text => text, :status => status end # Renders an empty response that can be used when the request is only interested in triggering an effect. Do note that good @@ -51,6 +51,14 @@ module ActionController render :partial => partial_name, :collection => collection, :spacer_template => partial_spacer_template, :locals => local_assigns end + def render_with_layout(template_name = default_template_name, status = nil, layout = nil) #:nodoc: + render :template => template_name, :status => status, :layout => layout + end + + def render_without_layout(template_name = default_template_name, status = nil) #:nodoc: + render :template => template_name, :status => status, :layout => false + end + # Deprecated in favor of calling redirect_to directly with the path. def redirect_to_path(path) #:doc: -- cgit v1.2.3