Skip to content

Commit

Permalink
Do not enforce template format, enforce handlers instead
Browse files Browse the repository at this point in the history
Fix #120
  • Loading branch information
rwz committed May 4, 2013
1 parent ffddad9 commit 7257675
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jbuilder/jbuilder_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7257675

Please sign in to comment.