lib/jbuilder/jbuilder_template.rb in jbuilder-1.3.0 vs lib/jbuilder/jbuilder_template.rb in jbuilder-1.4.0
- old
+ new
@@ -7,12 +7,12 @@
def partial!(options, locals = {})
case options
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
# Caches the json constructed within the block passed. Has the same signature as the `cache` helper
# method in `ActionView::Helpers::CacheHelper` and so can be used in the same way.
\ No newline at end of file