aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-xactionpack/lib/action_controller/base.rb9
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 => "" }))