From 06dd1f2ca3398b978bb286688aa68acacd7dd712 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Fri, 20 Jan 2006 22:04:07 +0000 Subject: Add render :update for inline RJS git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3441 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/layout.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller/layout.rb') diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index baa035507d..94fa4cc4ba 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -211,7 +211,7 @@ module ActionController #:nodoc: active_layout.include?('/') && !nested_controller ? active_layout : "layouts/#{active_layout}" if active_layout end - def render_with_a_layout(options = nil, deprecated_status = nil, deprecated_layout = nil) #:nodoc: + def render_with_a_layout(options = nil, deprecated_status = nil, deprecated_layout = nil, &block) #:nodoc: template_with_options = options.is_a?(Hash) if apply_layout?(template_with_options, options) && (layout = pick_layout(template_with_options, options, deprecated_layout)) @@ -219,10 +219,10 @@ module ActionController #:nodoc: logger.info("Rendering #{options} within #{layout}") if logger if template_with_options - content_for_layout = render_with_no_layout(options) + content_for_layout = render_with_no_layout(options, &block) deprecated_status = options[:status] || deprecated_status else - content_for_layout = render_with_no_layout(options, deprecated_status) + content_for_layout = render_with_no_layout(options, deprecated_status, &block) end erase_render_results @@ -230,7 +230,7 @@ module ActionController #:nodoc: @template.instance_variable_set("@content_for_layout", content_for_layout) render_text(@template.render_file(layout, true), deprecated_status) else - render_with_no_layout(options, deprecated_status) + render_with_no_layout(options, deprecated_status, &block) end end -- cgit v1.2.3