diff options
Diffstat (limited to 'actionpack/lib/action_controller/deprecated_renders_and_redirects.rb')
-rw-r--r-- | actionpack/lib/action_controller/deprecated_renders_and_redirects.rb | 10 |
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: |