aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/deprecated_renders_and_redirects.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-22 11:07:09 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-22 11:07:09 +0000
commit2f7c5f84e4834e49001ed565cfe45f14e120613f (patch)
tree03de7e58b569635cc117dad41b90d1db811a5139 /actionpack/lib/action_controller/deprecated_renders_and_redirects.rb
parentda0c4c5c9695e2ebe8d98b391d901b598dd293a2 (diff)
downloadrails-2f7c5f84e4834e49001ed565cfe45f14e120613f.tar.gz
rails-2f7c5f84e4834e49001ed565cfe45f14e120613f.tar.bz2
rails-2f7c5f84e4834e49001ed565cfe45f14e120613f.zip
Cure some ills discovered with the refactoring
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/deprecated_renders_and_redirects.rb')
-rw-r--r--actionpack/lib/action_controller/deprecated_renders_and_redirects.rb10
1 files changed, 9 insertions, 1 deletions
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: