Skip to content

Commit 6fd6c06

Browse files
committed
Small _set_inline_partial optimization
1 parent b7b5abb commit 6fd6c06

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/jbuilder/jbuilder_template.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,8 @@ def _set_inline_partial(name, object, options)
240240
_render_partial_with_options options
241241
end
242242
else
243-
locals = ::Hash[options[:as], object]
244243
_scope do
245-
options[:locals] = locals
244+
options[:locals] = { options[:as] => object }
246245
_render_partial_with_options options
247246
end
248247
end

0 commit comments

Comments
 (0)