aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Stephenson <sam@37signals.com>2006-01-23 16:36:40 +0000
committerSam Stephenson <sam@37signals.com>2006-01-23 16:36:40 +0000
commit7d0d0f0edd953b099351813882d20c27607a8906 (patch)
treea947889b5ab9d369eb691b4fee69a8049d0b2764
parent4d49f2ca091319b8bc7edcddcfdadffcd5fffca8 (diff)
downloadrails-7d0d0f0edd953b099351813882d20c27607a8906.tar.gz
rails-7d0d0f0edd953b099351813882d20c27607a8906.tar.bz2
rails-7d0d0f0edd953b099351813882d20c27607a8906.zip
Add render(:update) to ActionView::Base
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-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]