diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-23 15:58:38 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-27 11:49:11 -0700 |
commit | cecafc52ee0a4a53c903ddbaba95683261f88e5f (patch) | |
tree | 4cc1f0d246a313b2a2fa78747b3265bdbd901c22 /actionpack/lib/action_view/test_case.rb | |
parent | da3c21ead59cb47b8f4c69c6bd95f225a9c8b479 (diff) | |
download | rails-cecafc52ee0a4a53c903ddbaba95683261f88e5f.tar.gz rails-cecafc52ee0a4a53c903ddbaba95683261f88e5f.tar.bz2 rails-cecafc52ee0a4a53c903ddbaba95683261f88e5f.zip |
Refactor ActionView::Template
ActionView::Template is now completely independent from template
storage, which allows different back ends such as the database.
ActionView::Template's only responsibility is to take in the
template source (passed in from ActionView::Path), compile it,
and render it.
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r-- | actionpack/lib/action_view/test_case.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index c8f204046b..dddd671812 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -10,9 +10,10 @@ module ActionView alias_method :_render_template_without_template_tracking, :_render_template def _render_template(template, local_assigns = {}) - if template.respond_to?(:path) && !template.is_a?(InlineTemplate) - @_rendered[:partials][template] += 1 if template.is_a?(RenderablePartial) - @_rendered[:template] ||= template + if template.respond_to?(:identifier) + @_rendered[:partials][template] += 1 if template.partial? + @_rendered[:template] ||= [] + @_rendered[:template] << template end _render_template_without_template_tracking(template, local_assigns) end |