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
14
15
16
17
18
19
# File 'lib/hyrax/collection_name.rb', line 8

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'
  @collection         = 'collections'
  @element            = 'collection'
end