mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Check for respond_to? :to_ary instead of being
an Array.
This commit is contained in:
parent
a8760fa854
commit
c083774f9c
@ -37,7 +37,7 @@ module ActionController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def _render_option_json(json, options)
|
def _render_option_json(json, options)
|
||||||
if json.is_a?(Array)
|
if json.respond_to?(:to_ary)
|
||||||
options[:root] ||= controller_name
|
options[:root] ||= controller_name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user