Sha256: 96e61b235821c61c8ad37ef202bedfbe9e4b13e2705ccfa2f9ff8ff81ac1f57a
Contents?: true
Size: 655 Bytes
Versions: 39
Compression:
Stored size: 655 Bytes
Contents
# frozen_string_literal: true module StoreModel module CombineErrorsStrategies # +MarkInvalidErrorStrategy+ marks attribute invalid in the parent record. class MarkInvalidErrorStrategy # Invalidates +attribute+ in the parent record. # # @param attribute [String] name of the validated attribute # @param base_errors [ActiveModel::Errors] errors object of the parent record # @param _store_model_errors [ActiveModel::Errors] errors object of the # StoreModel::Model attribute def call(attribute, base_errors, _store_model_errors) base_errors.add(attribute, :invalid) end end end end
Version data entries
39 entries across 39 versions & 1 rubygems