mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06: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
|
||||
|
||||
def _render_option_json(json, options)
|
||||
if json.is_a?(Array)
|
||||
if json.respond_to?(:to_ary)
|
||||
options[:root] ||= controller_name
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user