File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -141,20 +141,20 @@ def _render_partial_with_options(options)
141
141
options . reverse_merge! ::JbuilderTemplate . template_lookup_options
142
142
as = options [ :as ]
143
143
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
+
144
152
if as && options . key? ( :collection ) && CollectionRenderer . supported?
145
153
collection = options . delete ( :collection ) || [ ]
146
154
partial = options . delete ( :partial )
147
155
options [ :locals ] . merge! ( json : self )
148
156
collection = EnumerableCompat . new ( collection ) if collection . respond_to? ( :count ) && !collection . respond_to? ( :size )
149
157
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
-
158
158
if collection . present?
159
159
if options . has_key? ( :layout )
160
160
raise ::NotImplementedError , "The `:layout' option is not supported in collection rendering."
You can’t perform that action at this time.
0 commit comments