Sha256: d6c7838507bf27cf400d6a88176509eab3a42d395cd1c7957f4a7d88afeb9838

Contents?: true

Size: 274 Bytes

Versions: 18

Compression:

Stored size: 274 Bytes

Contents

module Hydra::Works
  class NotFileSetValidator
    def self.validate!(_association, record)
      if record.try(:file_set?)
        raise ActiveFedora::AssociationTypeMismatch, "#{record} is a FileSet and may not be a member of the association"
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
hydra-works-2.2.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-2.1.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-2.0.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-1.2.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-1.1.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-1.0.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.17.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.16.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.15.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.12.1 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.14.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.13.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.12.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.11.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.10.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.9.0 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.8.1 lib/hydra/works/not_file_set_validator.rb
hydra-works-0.8 lib/hydra/works/not_file_set_validator.rb