aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-13 09:14:09 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-13 09:15:13 +0100
commitee4c89627ad5d7b041b88ab4027d3f0d5d582d8e (patch)
tree6b6a6bb3747e4cbebbb4f2b69f99bd6ded796768
parent89eae2d18711023d5c27f5375add219511523f0a (diff)
downloadrails-ee4c89627ad5d7b041b88ab4027d3f0d5d582d8e.tar.gz
rails-ee4c89627ad5d7b041b88ab4027d3f0d5d582d8e.tar.bz2
rails-ee4c89627ad5d7b041b88ab4027d3f0d5d582d8e.zip
Remove formats setters from render template, speeding up partial and collection renderings.
-rw-r--r--actionpack/lib/action_view/render/rendering.rb3
1 files changed, 1 insertions, 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