def merge_attributes attributes, default:
      hash = attributes || {}
      hash.merge(default) { |_key, oldval, newval| Array(newval) + Array(oldval) }
    end
def merge_attributes attributes, default:
      hash = attributes || {}
      hash.merge(default) { |_key, oldval, newval| Array(newval) + Array(oldval) }
    end
Given an attributes hash that could include any number of arbitrary keys, this method
 ensure we merge one or more 'default' attributes into the hash, creating the keys if
 don't exist, or merging the defaults if the keys already exists.
 It supports strings or arrays as values.