From 7d0d0f0edd953b099351813882d20c27607a8906 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Mon, 23 Jan 2006 16:36:40 +0000 Subject: Add render(:update) to ActionView::Base git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/base.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/base.rb') 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 template_path (relative to the template_root). # The hash in local_assigns 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] -- cgit v1.2.3