class Hydra::Works::NotCollectionValidator

Public Class Methods

validate!(_association, record) click to toggle source
# File lib/hydra/works/not_collection_validator.rb, line 3
def self.validate!(_association, record)
  if record.try(:collection?)
    raise ActiveFedora::AssociationTypeMismatch, "#{record} is a Collection and may not be a member of the association"
  end
end