From 72576755224b15da45e50cbea877679800ab1398 Mon Sep 17 00:00:00 2001 From: Pavel Pravosud Date: Tue, 2 Apr 2013 12:19:14 +0700 Subject: [PATCH] Do not enforce template format, enforce handlers instead Fix #120 --- lib/jbuilder/jbuilder_template.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jbuilder/jbuilder_template.rb b/lib/jbuilder/jbuilder_template.rb index 1daed98..abf67e1 100644 --- a/lib/jbuilder/jbuilder_template.rb +++ b/lib/jbuilder/jbuilder_template.rb @@ -9,9 +9,9 @@ def partial!(options, locals = {}) when ::Hash options[:locals] ||= {} options[:locals].merge!(:json => self) - @context.render(options.reverse_merge(:formats => [:json])) + @context.render(options.reverse_merge(:handlers => [:jbuilder])) else # String - @context.render(:partial => options, :locals => locals.merge(:json => self), :formats => [:json]) + @context.render(:partial => options, :locals => locals.merge(:json => self), :handlers => [:jbuilder]) end end