1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add render(:update) to ActionView::Base

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Sam Stephenson 2006-01-23 16:36:40 +00:00
parent 4d49f2ca09
commit 7d0d0f0edd
2 changed files with 5 additions and 1 deletions

View file

@ -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]

View file

@ -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]