Sha256: 46516ce58470e2085fe91e6114f0335c672248b65712c5f0e589216ebb332eb9

Contents?: true

Size: 544 Bytes

Versions: 2

Compression:

Stored size: 544 Bytes

Contents

# frozen_string_literal: true

module Hyrax
  ##
  # A custom name for Valkyrie PcdmCollection objects. Route keys are mapped to `collection`
  # not be the same as the model name.
  class CollectionName < Name
    def initialize(klass, namespace = nil, name = nil)
      super

      @human              = 'Collection'
      @i18n_key           = :collection
      @param_key          = 'collection'
      @plural             = 'collections'
      @route_key          = 'collections'
      @singular_route_key = 'collection'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hyrax-3.3.0 lib/hyrax/collection_name.rb
hyrax-3.2.0 lib/hyrax/collection_name.rb