Check for respond_to? :to_ary instead of being

an Array.
This commit is contained in:
Yehuda Katz 2012-01-10 20:53:29 -07:00
parent a8760fa854
commit c083774f9c

View File

@ -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