Sha256: eebd6f43d6eb674d46e8e8efcc2493fc789f2caa96f374b5c988575994031a9a

Contents?: true

Size: 659 Bytes

Versions: 9

Compression:

Stored size: 659 Bytes

Contents

module ActiveFedora::Associations::Builder
  class HasAndBelongsToMany < CollectionAssociation #:nodoc:
    extend Deprecation
    self.macro = :has_and_belongs_to_many

    self.valid_options += [:inverse_of, :solr_page_size]

    def validate_options
      super
      Deprecation.warn HasAndBelongsToMany, ":solr_page_size doesn't do anything anymore and will be removed in ActiveFedora 10" if options.key?(:solr_page_size)
      if !options[:predicate]
        raise "You must specify a predicate for #{name}"
      elsif !options[:predicate].is_a?(RDF::URI)
        raise ArgumentError, "Predicate must be a kind of RDF::URI"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
active-fedora-9.7.3 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.7.2 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.8.2 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.8.1 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.8.0 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.7.1 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.7.0 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.6.2 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.6.1 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb