Class: Hyrax::CollectionName

Inherits:
Name
  • Object
show all
Defined in:
lib/hyrax/collection_name.rb

Overview

A custom name for Valkyrie PcdmCollection objects. Route keys are mapped to `collection` not be the same as the model name.

Instance Method Summary collapse

Constructor Details

#initialize(klass, namespace = nil, name = nil) ⇒ CollectionName

Returns a new instance of CollectionName.


8
9
10
11
12
13
# File 'lib/hyrax/collection_name.rb', line 8

def initialize(klass, namespace = nil, name = nil)
  super

  @route_key          = Collection.model_name.route_key
  @singular_route_key = Collection.model_name.singular_route_key
end