diff options
author | Jamis Buck <jamis@37signals.com> | 2005-05-30 07:20:37 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-05-30 07:20:37 +0000 |
commit | 00db6f0faae6d53b7190981561beb6da0450359b (patch) | |
tree | 8428ee63213a011a077f9e49c1577c3e07f41cbc /actionpack/lib/action_controller | |
parent | b6c13f2d70eaa02f264281f34b518b4e9a6d41c6 (diff) | |
download | rails-00db6f0faae6d53b7190981561beb6da0450359b.tar.gz rails-00db6f0faae6d53b7190981561beb6da0450359b.tar.bz2 rails-00db6f0faae6d53b7190981561beb6da0450359b.zip |
render(:partial => "...") uses an empty hash for the local assigns #1365. render(:partial => true) is identical to the older render_partial()
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1366 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index aad581b8e7..0e2f87b468 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -473,13 +473,18 @@ module ActionController #:nodoc: render(options.merge({ :text => ( @template.render_partial_collection( - options[:partial], options[:collection], options[:spacer_template], options[:locals] + options[:partial] == true ? default_template_name : options[:partial], + options[:collection], options[:spacer_template], + options[:locals] || {} ) || '' ) })) elsif options[:partial] - render(options.merge({ :text => @template.render_partial(options[:partial], options[:object], options[:locals]) })) + render(options.merge({ :text => @template.render_partial( + options[:partial] == true ? default_template_name : options[:partial], + options[:object], options[:locals] || {} + ) })) elsif options[:nothing] render(options.merge({ :text => "" })) |