Sha256: b7295c2db83b1a31bb5a36717e47c427e0c976c68354e868699010993a91a188
Contents?: true
Size: 373 Bytes
Versions: 15
Compression:
Stored size: 373 Bytes
Contents
module Scimitar module Errors def add_errors_from_hash(errors_hash, prefix: nil) errors_hash.each_pair do |key, value| new_key = prefix.nil? ? key : "#{prefix}.#{key}".to_sym if value.is_a?(Array) value.each {|error| errors.add(new_key, error)} else errors.add(new_key, value) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems