Skip to content

Commit 0be827b

Browse files
authored
Set valkyrie models as default in Hyrax.config (#6715)
file_set_model is already the valkyrie model by default. .dassie continues to use the AF models. Existing hyrax applications continuing to use AF will need to set a similar config.
1 parent e4265da commit 0be827b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.dassie/config/initializers/hyrax.rb

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
# config.collection_model = 'Hyrax::PcdmCollection' # collection without basic metadata
6464
# config.collection_model = 'CollectionResource' # collection with basic metadata
6565
# config.admin_set_model = 'Hyrax::AdministrativeSet'
66+
67+
# dassie needs legacy AF models
68+
config.collection_model = '::Collection'
69+
config.admin_set_model = 'AdminSet'
70+
config.file_set_model = '::FileSet'
6671
end
6772

6873
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"

lib/hyrax/configuration.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module Hyrax
5555
#
5656
# == Valkyrie
5757
#
58-
# *Experimental:* Options for toggling Hyrax's experimental "Wings" valkyrie
58+
# Options for toggling Hyrax's "Wings" valkyrie
5959
# adapter and configuring valkyrie.
6060
#
6161
# @see Hyrax.config
@@ -617,14 +617,14 @@ def index_adapter=(adapter)
617617
end
618618

619619
##
620-
# @return [Boolean] whether to use the experimental valkyrie index
620+
# @return [Boolean] whether to use the valkyrie index
621621
def query_index_from_valkyrie
622622
@query_index_from_valkyrie ||= false
623623
end
624624
attr_writer :query_index_from_valkyrie
625625

626626
##
627-
# @return [Boolean] whether to use experimental valkyrie storage features
627+
# @return [Boolean] whether to use valkyrie storage features
628628
def use_valkyrie?
629629
return @use_valkyrie unless @use_valkyrie.nil?
630630
return true if disable_wings # always return true if wings is disabled
@@ -860,7 +860,7 @@ def collection_type_index_field
860860
# @return [#constantize] a string representation of the collection
861861
# model
862862
def collection_model
863-
@collection_model ||= '::Collection'
863+
@collection_model ||= 'Hyrax::PcdmCollection'
864864
end
865865

866866
##
@@ -874,7 +874,7 @@ def collection_class
874874
# @return [#constantize] a string representation of the admin set
875875
# model
876876
def admin_set_model
877-
@admin_set_model ||= 'AdminSet'
877+
@admin_set_model ||= 'Hyrax::AdministrativeSet'
878878
end
879879

880880
##

0 commit comments

Comments
 (0)