Class: ActiveFedora::Associations::Builder::HasAndBelongsToMany

Inherits:
CollectionAssociation show all
Extended by:
Deprecation
Defined in:
lib/active_fedora/associations/builder/has_and_belongs_to_many.rb

Overview

:nodoc:

Constant Summary

Constants inherited from CollectionAssociation

CollectionAssociation::CALLBACKS

Instance Attribute Summary

Attributes inherited from Association

#mixin, #model, #name, #options

Instance Method Summary collapse

Methods inherited from CollectionAssociation

define_callback, define_callbacks

Methods inherited from Association

build, #build, #configure_dependency, define_accessors, define_callbacks, define_readers, define_writers, #initialize, #predicate, #translate_property_to_predicate

Constructor Details

This class inherits a constructor from ActiveFedora::Associations::Builder::Association

Instance Method Details

#validate_optionsObject

Raises:

  • (ArgumentError)


8
9
10
11
12
13
# File 'lib/active_fedora/associations/builder/has_and_belongs_to_many.rb', line 8

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)
  raise "You must specify a predicate for #{name}" unless options[:predicate]
  raise ArgumentError, "Predicate must be a kind of RDF::URI" unless options[:predicate].is_a?(RDF::URI)
end