Module: ActiveInteractor::Context::AttributeValidation

Extended by:
ActiveSupport::Concern
Defined in:
lib/active_interactor/context/attribute_validation.rb

Instance Method Summary collapse

Instance Method Details

#validate_attributes!Object (protected)



14
15
16
17
18
19
# File 'lib/active_interactor/context/attribute_validation.rb', line 14

def validate_attributes!
  attribute_set.attributes.each do |attribute|
    attribute.validate!
    attribute.error_messages.each { |message| errors.add(attribute.name, message) }
  end
end