aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/layout.rb
diff options
context:
space:
mode:
authorSam Stephenson <sam@37signals.com>2006-01-20 22:04:07 +0000
committerSam Stephenson <sam@37signals.com>2006-01-20 22:04:07 +0000
commit06dd1f2ca3398b978bb286688aa68acacd7dd712 (patch)
tree7b924286338cb81f252b448ec3851238fab9573e /actionpack/lib/action_controller/layout.rb
parentf9c13e6134bbc32dd826eec39fedba5de2514f88 (diff)
downloadrails-06dd1f2ca3398b978bb286688aa68acacd7dd712.tar.gz
rails-06dd1f2ca3398b978bb286688aa68acacd7dd712.tar.bz2
rails-06dd1f2ca3398b978bb286688aa68acacd7dd712.zip
Add render :update for inline RJS
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3441 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/layout.rb')
-rw-r--r--actionpack/lib/action_controller/layout.rb8
1 files changed, 4 insertions, 4 deletions
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