mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Ruby 1.9 compat: Hash is now flattenable, so explicitly exclude it
This commit is contained in:
@@ -213,7 +213,7 @@ module ActiveRecord
|
||||
|
||||
# Array#flatten has problems with recursive arrays. Going one level deeper solves the majority of the problems.
|
||||
def flatten_deeper(array)
|
||||
array.collect { |element| element.respond_to?(:flatten) ? element.flatten : element }.flatten
|
||||
array.collect { |element| (element.respond_to?(:flatten) && !element.is_a?(Hash)) ? element.flatten : element }.flatten
|
||||
end
|
||||
|
||||
def owner_quoted_id
|
||||
|
||||
Reference in New Issue
Block a user