Class: Hydra::PCDM::Validators::PCDMValidator
- Inherits:
-
Object
- Object
- Hydra::PCDM::Validators::PCDMValidator
- Defined in:
- lib/hydra/pcdm/validators/pcdm_validator.rb
Class Method Summary collapse
Class Method Details
.validate!(_reflection, record) ⇒ Object
3 4 5 6 |
# File 'lib/hydra/pcdm/validators/pcdm_validator.rb', line 3 def self.validate!(_reflection, record) raise ActiveFedora::AssociationTypeMismatch, "#{record} is not a PCDM object or collection." if !record.try(:pcdm_object?) && !record.try(:pcdm_collection?) end |