Sha256: 0b29fdef00edb9324cf7bc007eee17cbd615e697c68c4ddd66feea0158fc536e

Contents?: true

Size: 626 Bytes

Versions: 48

Compression:

Stored size: 626 Bytes

Contents

module Hyrax
  # Answers queries about the cardinality of each field on the form.
  class FormMetadataService < HydraEditor::FieldMetadataService
    # @param [Class] model_class the class of the object
    # @param [Symbol] field the field we want to know about
    # @return [Boolean] true if the passed in field is a multivalued field
    def self.multiple?(model_class, field)
      case field.to_s
      when 'rights_statement'
        false
      when 'ordered_member_ids', 'in_works_ids', 'member_of_collection_ids'
        true
      else
        # Inquire at the model level
        super
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/services/hyrax/form_metadata_service.rb
hyrax-2.9.5 app/services/hyrax/form_metadata_service.rb
hyrax-2.9.4 app/services/hyrax/form_metadata_service.rb
hyrax-2.9.3 app/services/hyrax/form_metadata_service.rb
hyrax-2.9.2 app/services/hyrax/form_metadata_service.rb
hyrax-2.9.1 app/services/hyrax/form_metadata_service.rb
hyrax-2.9.0 app/services/hyrax/form_metadata_service.rb
hyrax-2.8.0 app/services/hyrax/form_metadata_service.rb
hyrax-2.7.2 app/services/hyrax/form_metadata_service.rb
hyrax-2.7.1 app/services/hyrax/form_metadata_service.rb
hyrax-2.7.0 app/services/hyrax/form_metadata_service.rb
hyrax-2.6.0 app/services/hyrax/form_metadata_service.rb
hyrax-3.0.0.pre.rc1 app/services/hyrax/form_metadata_service.rb
hyrax-3.0.0.pre.beta3 app/services/hyrax/form_metadata_service.rb
hyrax-2.5.1 app/services/hyrax/form_metadata_service.rb
hyrax-2.5.0 app/services/hyrax/form_metadata_service.rb
hyrax-3.0.0.pre.beta2 app/services/hyrax/form_metadata_service.rb
hyrax-2.4.1 app/services/hyrax/form_metadata_service.rb
hyrax-3.0.0.pre.beta1 app/services/hyrax/form_metadata_service.rb
hyrax-2.4.0 app/services/hyrax/form_metadata_service.rb