class StoreModel::CombineErrorsStrategies::MarkInvalidErrorStrategy

MarkInvalidErrorStrategy marks attribute invalid in the parent record.

Public Instance Methods

call(attribute, base_errors, _store_model_errors) click to toggle source

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

# File lib/store_model/combine_errors_strategies/mark_invalid_error_strategy.rb, line 13
def call(attribute, base_errors, _store_model_errors)
  base_errors.add(attribute, :invalid)
end