Sha256: 1f669e2981c5d95753c824126103b4143ae62c7b768b0540d93516f6b2ecbdeb

Contents?: true

Size: 663 Bytes

Versions: 10

Compression:

Stored size: 663 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].kind_of?(RDF::URI)
        raise ArgumentError, "Predicate must be a kind of RDF::URI"
      end
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
active-fedora-9.5.0 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.4.3 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.4.2 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.4.1 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.4.0 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.3.0 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.2.1 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.2.0 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.2.0.rc2 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb
active-fedora-9.2.0.rc1 lib/active_fedora/associations/builder/has_and_belongs_to_many.rb