# File lib/big_record/connection_adapters/column.rb, line 262 def hash_to_collection(hash) return hash unless hash.is_a?(Hash) # Make sure any new records sorted by their id before they're build. sorted_by_id = hash.sort_by { |id, _| id.is_a?(String) ? id.sub(/^new_/, '').to_i : id } array = [] sorted_by_id.each do |id, record_attributes| # remove blank records next if blank_or_invalid_record?(record_attributes) array << record_attributes end array end