diff --git a/app/models/accrediting_provider_enrichment.rb b/app/models/accrediting_provider_enrichment.rb index 4962e4b6bb..f0348b1c38 100644 --- a/app/models/accrediting_provider_enrichment.rb +++ b/app/models/accrediting_provider_enrichment.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class AccreditingProviderEnrichment - include ActiveModel::Validations include ActiveModel::Model # Pascal cased as the original is stored like so. @@ -9,10 +8,8 @@ class AccreditingProviderEnrichment validates :Description, words_count: { maximum: 100 } - def initialize(attrs) - attrs.each do |attr, value| - send("#{attr}=", value) unless attr == 'errors' - end + def initialize(attributes) + super(attributes.except('errors', 'context_for_validation')) end class ArraySerializer