Skip to content

Commit 68641aa

Browse files
authored
This was where it was
1 parent f5ba5bb commit 68641aa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/jbuilder/jbuilder_template.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,20 @@ def _render_partial_with_options(options)
141141
options.reverse_merge! ::JbuilderTemplate.template_lookup_options
142142
as = options[:as]
143143

144-
if options.has_key?(:layout)
145-
::Kernel.raise ::NotImplementedError, "The `:layout' option is not supported in collection rendering."
146-
end
147-
148-
if options.has_key?(:spacer_template)
149-
::Kernel.raise ::NotImplementedError, "The `:spacer_template' option is not supported in collection rendering."
150-
end
151-
152144
if as && options.key?(:collection) && CollectionRenderer.supported?
153145
collection = options.delete(:collection) || []
154146
partial = options.delete(:partial)
155147
options[:locals].merge!(json: self)
156148
collection = EnumerableCompat.new(collection) if collection.respond_to?(:count) && !collection.respond_to?(:size)
157149

150+
if options.has_key?(:layout)
151+
::Kernel.raise ::NotImplementedError, "The `:layout' option is not supported in collection rendering."
152+
end
153+
154+
if options.has_key?(:spacer_template)
155+
::Kernel.raise ::NotImplementedError, "The `:spacer_template' option is not supported in collection rendering."
156+
end
157+
158158
if collection.present?
159159
if options.has_key?(:layout)
160160
raise ::NotImplementedError, "The `:layout' option is not supported in collection rendering."

0 commit comments

Comments
 (0)