Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v3.0.9) is shown here.
flatten_deeper(array)
private
Array#flatten has problems with recursive arrays before Ruby 1.9.2. Going
one level deeper solves the majority of the problems.
# File activerecord/lib/active_record/associations/association_proxy.rb, line 271
def flatten_deeper(array)
array.collect { |element| (element.respond_to?(:flatten) && !element.is_a?(Hash)) ? element.flatten : element }.flatten
end