File tree 1 file changed +8
-8
lines changed
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
-
152
144
if as && options . key? ( :collection ) && CollectionRenderer . supported?
153
145
collection = options . delete ( :collection ) || [ ]
154
146
partial = options . delete ( :partial )
155
147
options [ :locals ] . merge! ( json : self )
156
148
collection = EnumerableCompat . new ( collection ) if collection . respond_to? ( :count ) && !collection . respond_to? ( :size )
157
149
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