mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Check for respond_to? :to_ary instead of being
an Array.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user