aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/base.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index dc540968f0..a99e9d7831 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Add render(:update) to ActionView::Base. [Sam Stephenson]
+
* Fix render(:update) to not render layouts. [Sam Stephenson]
* Fixed that SSL would not correctly be detected when running lighttpd/fcgi behind lighttpd w/mod_proxy #3548 [stephen_purcell@yahoo.com]
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 798d00673a..2f0eaf367c 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -239,9 +239,11 @@ module ActionView #:nodoc:
# Renders the template present at <tt>template_path</tt> (relative to the template_root).
# The hash in <tt>local_assigns</tt> is made available as local variables.
- def render(options = {}, old_local_assigns = {})
+ def render(options = {}, old_local_assigns = {}, &block)
if options.is_a?(String)
render_file(options, true, old_local_assigns)
+ elsif options == :update
+ update_page(&block)
elsif options.is_a?(Hash)
options[:locals] ||= {}
options[:use_full_path] = options[:use_full_path].nil? ? true : options[:use_full_path]