aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render/partials.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-10-07 20:48:21 +0200
committerJosé Valim <jose.valim@gmail.com>2010-10-07 21:31:31 +0200
commitc563f10f3e8083bebe32200fa065748c8bcb65c9 (patch)
treef014b8ab578bc88d9ba5847d3695584d2da733ec /actionpack/lib/action_view/render/partials.rb
parent8f9e9118e402ea2fe1eec6fcb9a2d3f0c84b3b46 (diff)
downloadrails-c563f10f3e8083bebe32200fa065748c8bcb65c9.tar.gz
rails-c563f10f3e8083bebe32200fa065748c8bcb65c9.tar.bz2
rails-c563f10f3e8083bebe32200fa065748c8bcb65c9.zip
render :template => 'foo/bar.json' now works as it should.
Diffstat (limited to 'actionpack/lib/action_view/render/partials.rb')
-rw-r--r--actionpack/lib/action_view/render/partials.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb
index f7bdbd6917..24d9e9ffb5 100644
--- a/actionpack/lib/action_view/render/partials.rb
+++ b/actionpack/lib/action_view/render/partials.rb
@@ -371,13 +371,15 @@ module ActionView
end
def _render_partial(options, &block) #:nodoc:
- if defined?(@renderer)
- @renderer.setup(options, block)
- else
- @renderer = PartialRenderer.new(self, options, block)
- end
+ _wrap_formats(options[:partial]) do
+ if defined?(@renderer)
+ @renderer.setup(options, block)
+ else
+ @renderer = PartialRenderer.new(self, options, block)
+ end
- @renderer.render
+ @renderer.render
+ end
end
end