From ee4c89627ad5d7b041b88ab4027d3f0d5d582d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 13 Mar 2010 09:14:09 +0100 Subject: Remove formats setters from render template, speeding up partial and collection renderings. --- actionpack/lib/action_view/render/rendering.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index 9b5b976727..310efe40e2 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -22,6 +22,7 @@ module ActionView _render_partial(options) else template = _determine_template(options) + self.formats = template.formats _render_template(template, options[:layout], options) end when :update @@ -49,8 +50,6 @@ module ActionView # Renders the given template. An string representing the layout can be # supplied as well. def _render_template(template, layout = nil, options = {}) #:nodoc: - self.formats = template.formats - locals = options[:locals] || {} layout = find_layout(layout) if layout -- cgit v1.2.3