aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-08-07 05:40:01 -0300
committerYehuda Katz <wycats@gmail.com>2009-08-07 05:40:01 -0300
commit493d84ce2f1e25081a394fd70ac4e23b6a2be682 (patch)
tree5116c84591ac3ba074cfba406ca92c58dcf33779 /actionpack/lib/action_view/test_case.rb
parent59e475e3a66fe647ea74f4daf472d82bc9b4535c (diff)
downloadrails-493d84ce2f1e25081a394fd70ac4e23b6a2be682.tar.gz
rails-493d84ce2f1e25081a394fd70ac4e23b6a2be682.tar.bz2
rails-493d84ce2f1e25081a394fd70ac4e23b6a2be682.zip
Modify various partial methods to carry along the block that can be passed in with render
* _render_single_template, which renders a template without layout * _render_partial_unknown_type, which renders a partial of unknown type (the entry method for most partial rendering; supports strings, objects, and collections) * _render_partial_object, which renders a partial for a single object. * extracted _render_partial_path so it can be used to render the spacer without going through the public render :partial
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r--actionpack/lib/action_view/test_case.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb
index 71a4a88afe..e51744d095 100644
--- a/actionpack/lib/action_view/test_case.rb
+++ b/actionpack/lib/action_view/test_case.rb
@@ -10,13 +10,13 @@ module ActionView
attr_internal :rendered
alias_method :_render_template_without_template_tracking, :_render_single_template
- def _render_single_template(template, local_assigns = {})
+ def _render_single_template(template, local_assigns, &block)
if template.respond_to?(:identifier) && template.present?
@_rendered[:partials][template] += 1 if template.partial?
@_rendered[:template] ||= []
@_rendered[:template] << template
end
- _render_template_without_template_tracking(template, local_assigns)
+ _render_template_without_template_tracking(template, local_assigns, &block)
end
end