Permalink
Browse files

Add render(:update) to ActionView::Base

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 4d49f2c commit 7d0d0f0edd953b099351813882d20c27607a8906 @sstephenson sstephenson committed Jan 23, 2006
Showing with 5 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +3 −1 actionpack/lib/action_view/base.rb
View
@@ -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]
@@ -239,9 +239,11 @@ def render_file(template_path, use_full_path = true, local_assigns = {})
# 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]

0 comments on commit 7d0d0f0

Please sign in to comment.