Skip to content

Commit 8f9993a

Browse files
committed
Stop mutating options in array! method
1 parent 1245776 commit 8f9993a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/jbuilder/jbuilder_template.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ def array!(collection = [], *args)
121121
options = args.first
122122

123123
if args.one? && _partial_options?(options)
124+
options = options.dup
124125
options[:collection] = collection
125-
partial! options
126+
_render_partial_with_options options
126127
else
127128
super
128129
end

0 commit comments

Comments
 (0)