Sha256: ea443c225b1fa12d2fb8ff0807d421a2f19de54613dd385d2623409134a0db28
Contents?: true
Size: 438 Bytes
Versions: 12
Compression:
Stored size: 438 Bytes
Contents
ActiveModel::Errors.class_eval do def <<(other) copy_messages_from(other) copy_details_from(other) if respond_to?(:details) self end private def copy_details_from(other) details.merge!(other.details) do |_, val_one, val_two| [*val_one] + [*val_two] end end def copy_messages_from(other) messages.merge!(other.messages) do |_, val_one, val_two| [*val_one] + [*val_two] end end end
Version data entries
12 entries across 12 versions & 1 rubygems