Sha256: d267b42ac5987aab4a279af25bbf2a1ed1d4aea714f3a414305c9d1f93155e88
Contents?: true
Size: 431 Bytes
Versions: 5
Compression:
Stored size: 431 Bytes
Contents
# frozen_string_literal: true class PGTrunk::Operation # @private # Enable validation of the operation in the Rails way module Validations extend ActiveSupport::Concern class_methods do extend ActiveModel::Validations end def error_messages errors.messages.flat_map do |k, v| Array(v).map do |msg| k == :base ? msg : [k, msg].join(" ") end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems